Sf2Player: properly update patch if panning support is enabled

If SF2_PANNING_SUPPORT is set, changed patches were applied to current
channel after calling fluid_synth_noteon(...) - some notes still were played
with the old patch until m_channel made one round trip.
This commit is contained in:
Tobias Doerffel
2009-03-15 21:57:17 +01:00
parent 7449c4f731
commit f0cd8631d7

View File

@@ -593,12 +593,14 @@ void sf2Instrument::playNote( notePlayHandle * _n, sampleFrame * )
m_synthMutex.lock();
#ifdef SF2_PANNING_SUPPORT
updatePatch();
#endif
fluid_synth_noteon( m_synth, pluginData->midiChannel, midiNote,
_n->getMidiVelocity() );
#ifdef SF2_PANNING_SUPPORT
updatePatch();
if( ++m_channel > m_maxChannels )
{
m_channel = 1;