#include "libardour-config.h"
#endif
-#define __STDC_FORMAT_MACROS 1
#include <stdint.h>
#include <cstdio> /* for sprintf */
string
path_expand (string path)
{
+ if (path.empty()) {
+ return path;
+ }
+
#ifdef HAVE_WORDEXP
/* Handle tilde and environment variable expansion in session path */
string ret = path;
#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);