From ae105c22cc805d978237920c699656ab1b8b0788 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 8 Mar 2014 12:53:57 +0100 Subject: [PATCH] InstrumentTrack: explicitely test for single streamed instrument ...instead of implicitely assuming that the instrument is single-streamed just because it did not pass a NotePlayHandle. --- src/tracks/InstrumentTrack.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 1e8655996..9f5153a3b 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -163,7 +163,8 @@ void InstrumentTrack::processAudioBuffer( sampleFrame* buf, const fpp_t frames, // We could do that in all other cases as well but the overhead for silence test is bigger than // what we potentially save. While playing a note, a NotePlayHandle-driven instrument will produce sound in // 99 of 100 cases so that test would be a waste of time. - if( n == NULL && MixHelpers::isSilent( buf, frames ) ) + if( m_instrument->flags().testFlag( Instrument::IsSingleStreamed ) && + MixHelpers::isSilent( buf, frames ) ) { // at least pass one silent buffer to allow if( m_silentBuffersProcessed )