Revision to a previous PR. midi sustain of sf2 player
This commit is contained in:
@@ -576,11 +576,15 @@ void sf2Instrument::playNote( NotePlayHandle * _n, sampleFrame * )
|
||||
m_playingNotes.append( _n );
|
||||
m_playingNotesMutex.unlock();
|
||||
}
|
||||
else if( _n->isReleased() ) // note is released during this period
|
||||
else if( _n->isReleased() && ! _n->instrumentTrack()->isSustainPedalPressed() ) // note is released during this period
|
||||
{
|
||||
SF2PluginData * pluginData = static_cast<SF2PluginData *>( _n->m_pluginData );
|
||||
pluginData->offset = _n->framesBeforeRelease();
|
||||
pluginData->isNew = false;
|
||||
|
||||
m_playingNotesMutex.lock();
|
||||
m_playingNotes.append( _n );
|
||||
m_playingNotesMutex.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user