Mercurial > hg > svapp
changeset 749:54393ed09d65
Add haveEffect, implement clearEffect
author | Chris Cannam |
---|---|
date | Wed, 22 Apr 2020 17:10:36 +0100 |
parents | baa7d3a85317 |
children | e7c77c366360 |
files | audio/EffectWrapper.cpp audio/EffectWrapper.h |
diffstat | 2 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/audio/EffectWrapper.cpp Wed Apr 22 14:48:22 2020 +0100 +++ b/audio/EffectWrapper.cpp Wed Apr 22 17:10:36 2020 +0100 @@ -50,6 +50,18 @@ m_failed = false; } +bool +EffectWrapper::haveEffect() const +{ + return m_effect.lock() != nullptr; +} + +void +EffectWrapper::clearEffect() +{ + m_effect = {}; +} + void EffectWrapper::setBypassed(bool bypassed) {
--- a/audio/EffectWrapper.h Wed Apr 22 14:48:22 2020 +0100 +++ b/audio/EffectWrapper.h Wed Apr 22 17:10:36 2020 +0100 @@ -55,6 +55,11 @@ void setEffect(std::weak_ptr<RealTimePluginInstance>); /** + * Return true if an effect is currently set to be applied. + */ + bool haveEffect() const; + + /** * Remove any applied effect without setting another one. */ void clearEffect();