Skip to content

Commit

Permalink
disable all logging on Zynthian platform
Browse files Browse the repository at this point in the history
  • Loading branch information
dsp56300 committed Sep 27, 2024
1 parent aa6beca commit 32df65f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
17 changes: 17 additions & 0 deletions source/jucePluginEditorLib/pluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 5 additions & 0 deletions source/virusLib/dspSingle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 32df65f

Please sign in to comment.