#include "libardour-config.h"
#endif
-#define __STDC_FORMAT_MACROS 1
#include <stdint.h>
#include <cstdio> /* for sprintf */
#endif
}
-#if defined(HAVE_COREAUDIO) || defined(HAVE_AUDIOUNITS)
+#if __APPLE__
string
CFStringRefToStdString(CFStringRef stringRef)
{
delete [] buf;
return result;
}
-#endif // HAVE_COREAUDIO
+#endif // __APPLE__
void
-compute_equal_power_fades (nframes_t nframes, float* in, float* out)
+compute_equal_power_fades (framecnt_t nframes, float* in, float* out)
{
double step;
in[0] = 0.0f;
- for (nframes_t i = 1; i < nframes - 1; ++i) {
+ for (framecnt_t i = 1; i < nframes - 1; ++i) {
in[i] = in[i-1] + step;
}
const float pan_law_attenuation = -3.0f;
const float scale = 2.0f - 4.0f * powf (10.0f,pan_law_attenuation/20.0f);
- for (nframes_t n = 0; n < nframes; ++n) {
+ for (framecnt_t n = 0; n < nframes; ++n) {
float inVal = in[n];
float outVal = 1 - inVal;
out[n] = outVal * (scale * outVal + 1.0f - scale);
SyncSource
string_to_sync_source (string str)
{
- if (str == _("MIDI Timecode")) {
+ if (str == _("MIDI Timecode") || str == _("MTC")) {
return MTC;
}
return JACK;
}
+/** @param sh Return a short version of the string */
const char*
-sync_source_to_string (SyncSource src)
+sync_source_to_string (SyncSource src, bool sh)
{
switch (src) {
case JACK:
return _("JACK");
case MTC:
- return _("MIDI Timecode");
+ if (sh) {
+ return _("MTC");
+ } else {
+ return _("MIDI Timecode");
+ }
case MIDIClock:
return _("MIDI Clock");