Fix empty VST tracks creating noise in playback (#3798)
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include <QMenu>
|
||||
#include <QDomElement>
|
||||
|
||||
#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();
|
||||
|
||||
Reference in New Issue
Block a user