diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index 650af5c52..0985f5e2e 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -32,6 +32,7 @@ #include #include +#include "BufferManager.h" #include "Engine.h" #include "gui_templates.h" #include "InstrumentPlayHandle.h" @@ -281,16 +282,19 @@ void vestigeInstrument::loadFile( const QString & _file ) void vestigeInstrument::play( sampleFrame * _buf ) { m_pluginMutex.lock(); + + const fpp_t frames = Engine::mixer()->framesPerPeriod(); + if( m_plugin == NULL ) { + BufferManager::clear( _buf, frames ); + m_pluginMutex.unlock(); return; } m_plugin->process( NULL, _buf ); - const fpp_t frames = Engine::mixer()->framesPerPeriod(); - instrumentTrack()->processAudioBuffer( _buf, frames, NULL ); m_pluginMutex.unlock();