commit 32df65f65e3b9f57fffc7d94d39e19cf2c290704
parent aa6beca1882e57997121cbf321aafdf35fd78a63
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Fri, 27 Sep 2024 21:52:41 +0200
disable all logging on Zynthian platform
Diffstat:
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/source/jucePluginEditorLib/pluginProcessor.cpp b/source/jucePluginEditorLib/pluginProcessor.cpp
@@ -5,13 +5,30 @@
#include "baseLib/binarystream.h"
+#ifdef ZYNTHIAN
+#include "dsp56kEmu/logging.h"
+#endif
+
namespace jucePluginEditorLib
{
+ namespace
+ {
+#ifdef ZYNTHIAN
+ void noLoggingFunc(const std::string&)
+ {
+ // https://discourse.zynthian.org/t/deadlock-when-attempting-to-log-to-stdout/10169
+ }
+#endif
+ }
+
Processor::Processor(const BusesProperties& _busesProperties, const juce::PropertiesFile::Options& _configOptions, const pluginLib::Processor::Properties& _properties)
: pluginLib::Processor(_busesProperties, _properties)
, m_configOptions(_configOptions)
, m_config(_configOptions)
{
+#ifdef ZYNTHIAN
+ Logging::setLogFunc(&noLoggingFunc);
+#endif
}
Processor::~Processor()
diff --git a/source/virusLib/dspSingle.cpp b/source/virusLib/dspSingle.cpp
@@ -75,6 +75,11 @@ namespace virusLib
#endif
m_dspThread.reset(new dsp56k::DSPThread(*m_dsp, m_name.empty() ? nullptr : m_name.c_str(), debugger));
+
+#ifdef ZYNTHIAN
+ m_dspThread->setLogToDebug(false);
+ m_dspThread->setLogToStdout(false);
+#endif
}
template<typename T> void processAudio(DspSingle& _dsp, const synthLib::TAudioInputsT<T>& _inputs, const synthLib::TAudioOutputsT<T>& _outputs, const size_t _samples, uint32_t _latency, std::vector<T>& _dummyIn, std::vector<T>& _dummyOut)