From 1ac68cc3d2d082555b26c5c5d2a229b633b779b8 Mon Sep 17 00:00:00 2001 From: Paul Fd Date: Fri, 6 Mar 2020 11:07:56 +0100 Subject: [PATCH] Add introspection in the busses --- src/sfizz/Effects.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/sfizz/Effects.h b/src/sfizz/Effects.h index 1d0947ed..17ded9de 100644 --- a/src/sfizz/Effects.h +++ b/src/sfizz/Effects.h @@ -106,6 +106,20 @@ public: */ void setGainToMix(float gain) { _gainToMix = gain; } + /** + * @brief Returns the gain for the main out + * + * @return float + */ + float gainToMain() const { return _gainToMain; } + + /** + * @brief Returns the gain for the mix out + * + * @return float + */ + float gainToMix() const { return _gainToMix; } + /** @brief Resets the input buffers to zero. */ @@ -143,6 +157,12 @@ public: */ void setSamplesPerBlock(int samplesPerBlock) noexcept; + /** + * @brief Return the number of effects in the bus + * + * @return size_t + */ + size_t numEffects() const noexcept; private: std::vector> _effects; AudioBuffer _inputs { EffectChannels, config::defaultSamplesPerBlock };