Skip to content

Commit

Permalink
Merge pull request #2877 from serdnab/sf2sustain-rev
Browse files Browse the repository at this point in the history
Revision to a previous PR. midi sustain of sf2 player
  • Loading branch information
jasp00 committed Jun 29, 2016
2 parents 0789311 + 66b6a64 commit ab5bc38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/sf2_player/sf2_player.cpp
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit ab5bc38

Please sign in to comment.