Specify infinte timeout in tryLock on export
Ensures remote plugins always process sound on export.
Follow-up of 408b72c798.
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user