From ee63a13f2d30a342c47abea38a1a8903e3a4f570 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Fri, 28 Aug 2009 23:54:18 +0200 Subject: [PATCH] RemotePlugin: do not skip audio processing when debugging If DEBUG_REMOTE_PLUGIN was set, RemotePlugin::process() always returned as RemotePlugin::isRunning() returned false. Fix this by always returning true when debugging. --- include/RemotePlugin.h | 7 +++++-- src/core/RemotePlugin.cpp | 10 ++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/RemotePlugin.h b/include/RemotePlugin.h index 86b38c1f6..12ad00026 100644 --- a/include/RemotePlugin.h +++ b/include/RemotePlugin.h @@ -701,7 +701,11 @@ public: inline bool isRunning() { +#ifdef DEBUG_REMOTE_PLUGIN + return true; +#else return m_process.state() != QProcess::NotRunning; +#endif } inline void waitForInitDone( bool _busy_waiting = true ) @@ -993,8 +997,7 @@ RemotePluginBase::message RemotePluginBase::waitForMessage( RemotePluginClient::RemotePluginClient( key_t _shm_in, key_t _shm_out ) : - RemotePluginBase( new shmFifo( _shm_in ), - new shmFifo( _shm_out ) ), + RemotePluginBase( new shmFifo( _shm_in ), new shmFifo( _shm_out ) ), #ifdef USE_QT_SHMEM m_shmObj(), #endif diff --git a/src/core/RemotePlugin.cpp b/src/core/RemotePlugin.cpp index 8dd022e6f..e712cda80 100644 --- a/src/core/RemotePlugin.cpp +++ b/src/core/RemotePlugin.cpp @@ -22,8 +22,11 @@ * */ - #define COMPILE_REMOTE_PLUGIN_BASE +//#define DEBUG_REMOTE_PLUGIN +#ifdef DEBUG_REMOTE_PLUGIN +#include +#endif #include "RemotePlugin.h" #include "mixer.h" @@ -36,11 +39,6 @@ #include #endif -//#define DEBUG_REMOTE_PLUGIN -#ifdef DEBUG_REMOTE_PLUGIN -#include -#endif - // simple helper thread monitoring our RemotePlugin - if process terminates // unexpectedly invalidate plugin so LMMS doesn't lock up