Skip to content
Permalink
Browse files
Specify infinte timeout in tryLock on export
Ensures remote plugins always process sound on export.
Follow-up of 408b72c.
  • Loading branch information
PhysSong committed Sep 19, 2018
1 parent dd7b086 commit 9fe74c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
@@ -95,7 +95,7 @@ bool VstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
sampleFrame * buf = new sampleFrame[_frames];
#endif
memcpy( buf, _buf, sizeof( sampleFrame ) * _frames );
if (m_pluginMutex.tryLock())
if (m_pluginMutex.tryLock(Engine::getSong()->isExporting() ? -1 : 0))
{
m_plugin->process( buf, buf );
m_pluginMutex.unlock();
@@ -47,6 +47,7 @@
#include "GuiApplication.h"
#include "PixmapButton.h"
#include "SampleBuffer.h"
#include "Song.h"
#include "StringPairDrag.h"
#include "TextFloat.h"
#include "ToolTip.h"
@@ -360,7 +361,7 @@ void vestigeInstrument::loadFile( const QString & _file )

void vestigeInstrument::play( sampleFrame * _buf )
{
if (!m_pluginMutex.tryLock()) {return;}
if (!m_pluginMutex.tryLock(Engine::getSong()->isExporting() ? -1 : 0)) {return;}

const fpp_t frames = Engine::mixer()->framesPerPeriod();

@@ -40,6 +40,7 @@
#include "InstrumentPlayHandle.h"
#include "InstrumentTrack.h"
#include "gui_templates.h"
#include "Song.h"
#include "StringPairDrag.h"
#include "RemoteZynAddSubFx.h"
#include "LocalZynAddSubFx.h"
@@ -325,7 +326,7 @@ QString ZynAddSubFxInstrument::nodeName() const

void ZynAddSubFxInstrument::play( sampleFrame * _buf )
{
if (!m_pluginMutex.tryLock()) {return;}
if (!m_pluginMutex.tryLock(Engine::getSong()->isExporting() ? -1 : 0)) {return;}
if( m_remotePlugin )
{
m_remotePlugin->process( NULL, _buf );

0 comments on commit 9fe74c2

Please sign in to comment.