mirror of
https://github.com/AxioDL/amuse.git
synced 2025-07-01 19:03:47 +00:00
Update Voice.cpp
This commit is contained in:
parent
233c53ac57
commit
1d726ed179
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user