mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-11 02:26:19 -04:00
Oscillator: reverted recent fix for PM
As of acaaea8204 a samplerate dependent
ratio has been added into calculation of the local phase. This however is
wrong for PM.
This commit is contained in:
@@ -375,13 +375,11 @@ void oscillator::updatePM( sampleFrame * _ab, const fpp_t _frames,
|
||||
m_subOsc->update( _ab, _frames, _chnl );
|
||||
recalcPhase();
|
||||
const float osc_coeff = m_freq * m_detuning;
|
||||
const float sampleRateCorrection = 44100.0f /
|
||||
engine::getMixer()->processingSampleRate();
|
||||
|
||||
for( fpp_t frame = 0; frame < _frames; ++frame )
|
||||
{
|
||||
_ab[frame][_chnl] = getSample<W>( m_phase +
|
||||
_ab[frame][_chnl]*sampleRateCorrection )
|
||||
_ab[frame][_chnl] )
|
||||
* m_volume;
|
||||
m_phase += osc_coeff;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user