From 7cefe51c0d4f2f719f84c439287388b1f86a4f20 Mon Sep 17 00:00:00 2001 From: Dmitry Klepikov Date: Wed, 24 Nov 2021 14:38:12 +0200 Subject: [PATCH] Set bypass flag for plugin --- .../juce_audio_processors/processors/juce_AudioProcessor.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 07f68c8402..02bf145608 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -796,6 +796,12 @@ public: */ double getSampleRate() const noexcept { return currentSampleRate; } + /** Returns true if plugin in the current DAW is bypassed. */ + bool getIsDawBypass() const noexcept { return isDawBypass; } + + /** Changes the processor flag to bypassed. */ + void setIsDawBypass(bool bIsDawBypass) noexcept { isDawBypass = bIsDawBypass; } + /** Returns the current typical block size that is being used. This can be called from your processBlock() method - it's not guaranteed @@ -1468,6 +1474,7 @@ private: double currentSampleRate = 0; int blockSize = 0, latencySamples = 0; bool suspended = false; + bool isDawBypass = false; std::atomic nonRealtime { false }; ProcessingPrecision processingPrecision = singlePrecision; CriticalSection callbackLock, listenerLock, activeEditorLock;