diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index c8ec24d6e..42ad3f0a3 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -388,8 +388,10 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) while( frames_processed < Engine::mixer()->framesPerPeriod() ) { const f_cnt_t remaining_frames_for_cur_arp = arp_frames - ( cur_frame % arp_frames ); - // does current arp-note fill whole audio-buffer? - if( remaining_frames_for_cur_arp > Engine::mixer()->framesPerPeriod() ) + // does current arp-note fill whole audio-buffer or is the remaining time just + // a short bit that we can discard? + if( remaining_frames_for_cur_arp > Engine::mixer()->framesPerPeriod() || + _n->frames() - _n->totalFramesPlayed() < arp_frames / 5 ) { // then we don't have to do something! break;