Update Voice.cpp

This commit is contained in:
Jack Andersen 2016-05-11 12:39:24 -10:00
parent 233c53ac57
commit 1d726ed179
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ void Voice::_doKeyOff()
void Voice::_setTotalPitch(int32_t cents)
{
int32_t interval = cents - m_curSample->first.m_pitch * 100;
double ratio = std::pow(2.0, interval / 1200.0);
double ratio = std::exp2(interval / 1200.0);
m_sampleRate = m_curSample->first.m_sampleRate * ratio;
m_backendVoice->setPitchRatio(ratio);
}