diff --git a/libraries/lib-time-and-pitch/StaffPad/TimeAndPitch.cpp b/libraries/lib-time-and-pitch/StaffPad/TimeAndPitch.cpp index bccaceebdc83..2c421bb13b39 100644 --- a/libraries/lib-time-and-pitch/StaffPad/TimeAndPitch.cpp +++ b/libraries/lib-time-and-pitch/StaffPad/TimeAndPitch.cpp @@ -187,7 +187,7 @@ namespace { // wrap a phase value into -PI..PI inline float _unwrapPhase(float arg) { - return arg - std::rint(arg * 0.15915494309f) * 6.283185307f; + return arg - int(arg * 0.15915494309f + 0.5f) * 6.283185307f; } void _unwrapPhaseVec(float* v, int n)