mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-08 21:17:49 +00:00
Update Voice.cpp
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user