Skip to content

Commit 9fe74c2

Browse files
committed
Specify infinte timeout in tryLock on export
Ensures remote plugins always process sound on export. Follow-up of 408b72c.
1 parent dd7b086 commit 9fe74c2

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

plugins/VstEffect/VstEffect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ bool VstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
9595
sampleFrame * buf = new sampleFrame[_frames];
9696
#endif
9797
memcpy( buf, _buf, sizeof( sampleFrame ) * _frames );
98-
if (m_pluginMutex.tryLock())
98+
if (m_pluginMutex.tryLock(Engine::getSong()->isExporting() ? -1 : 0))
9999
{
100100
m_plugin->process( buf, buf );
101101
m_pluginMutex.unlock();

plugins/vestige/vestige.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "GuiApplication.h"
4848
#include "PixmapButton.h"
4949
#include "SampleBuffer.h"
50+
#include "Song.h"
5051
#include "StringPairDrag.h"
5152
#include "TextFloat.h"
5253
#include "ToolTip.h"
@@ -360,7 +361,7 @@ void vestigeInstrument::loadFile( const QString & _file )
360361

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

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

plugins/zynaddsubfx/ZynAddSubFx.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "InstrumentPlayHandle.h"
4141
#include "InstrumentTrack.h"
4242
#include "gui_templates.h"
43+
#include "Song.h"
4344
#include "StringPairDrag.h"
4445
#include "RemoteZynAddSubFx.h"
4546
#include "LocalZynAddSubFx.h"
@@ -325,7 +326,7 @@ QString ZynAddSubFxInstrument::nodeName() const
325326

326327
void ZynAddSubFxInstrument::play( sampleFrame * _buf )
327328
{
328-
if (!m_pluginMutex.tryLock()) {return;}
329+
if (!m_pluginMutex.tryLock(Engine::getSong()->isExporting() ? -1 : 0)) {return;}
329330
if( m_remotePlugin )
330331
{
331332
m_remotePlugin->process( NULL, _buf );

0 commit comments

Comments
 (0)