diff options
author | Jesse Chappell <jesse@essej.net> | 2005-11-29 06:49:00 +0000 |
---|---|---|
committer | Jesse Chappell <jesse@essej.net> | 2005-11-29 06:49:00 +0000 |
commit | d9b463178f20a236c7ff23180f94e76435f2e98a (patch) | |
tree | 52c8695b8a6d0e845df61a38e80f62e6521b1229 /libs/ardour/panner.cc | |
parent | b1a99f89da52018d3995592eb821f8e4a3c89a28 (diff) |
committed fix for cross-endian native wave files
git-svn-id: svn://localhost/trunk/ardour2@146 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/panner.cc')
-rw-r--r-- | libs/ardour/panner.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index 63bcd7f302..130db16191 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -41,6 +41,9 @@ #include "i18n.h" +#include <pbd/mathfix.h> + + using namespace std; using namespace ARDOUR; @@ -778,8 +781,12 @@ Multi2dPanner::update () } f += dsq[i] * dsq[i]; } - fr = 1.0f / sqrtf(f); - +#ifdef __APPLE__ + // terrible hack to support OSX < 10.3.9 builds + fr = (float) (1.0 / sqrt((double)f)); +#else + fr = 1.0 / sqrtf(f); +#endif for (i = 0; i < nouts; ++i) { parent.outputs[i].desired_pan = 1.0f - (dsq[i] * fr); } |