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 committed 2009-03-15 21:57:17 +01:00
1 parent 7449c4f731
commit f0cd8631d7
1 file changed
+4 -2
+4 -2
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;