diff --git a/plugins/sfxr/sfxr.cpp b/plugins/sfxr/sfxr.cpp index ab1132197..66f9b58a1 100644 --- a/plugins/sfxr/sfxr.cpp +++ b/plugins/sfxr/sfxr.cpp @@ -23,7 +23,8 @@ * Boston, MA 02110-1301 USA. */ -#include +#include +#include #define rnd(n) (rand()%(n+1)) @@ -447,7 +448,6 @@ QString sfxrInstrument::nodeName() const void sfxrInstrument::playNote( notePlayHandle * _n, sampleFrame * _working_buffer ) { - m_synthMutex.lock(); fpp_t frameNum = _n->framesLeftForCurrentPeriod(); if ( _n->totalFramesPlayed() == 0 ) { @@ -456,6 +456,7 @@ void sfxrInstrument::playNote( notePlayHandle * _n, sampleFrame * _working_buffe else if( static_cast(_n->m_pluginData)->isPlaying() == false ) { _n->noteOff(); + return; } fpp_t pitchedFrameNum = (_n->frequency()/BaseFreq)*frameNum; @@ -470,7 +471,6 @@ void sfxrInstrument::playNote( notePlayHandle * _n, sampleFrame * _working_buffe } delete[] pitchedBuffer; - m_synthMutex.unlock(); instrumentTrack()->processAudioBuffer( _working_buffer, frameNum, NULL ); } diff --git a/plugins/sfxr/sfxr.h b/plugins/sfxr/sfxr.h index 2d9934219..20250db70 100644 --- a/plugins/sfxr/sfxr.h +++ b/plugins/sfxr/sfxr.h @@ -184,7 +184,6 @@ public: private: - QMutex m_synthMutex; SfxrZeroToOneFloatModel m_attModel; SfxrZeroToOneFloatModel m_holdModel; SfxrZeroToOneFloatModel m_susModel;