diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index a10fe5f5..eeedafe1 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -810,6 +810,11 @@ const sfz::Region* sfz::Synth::getRegionView(int idx) const noexcept return (size_t)idx < regions.size() ? regions[idx].get() : nullptr; } +const sfz::EffectBus* sfz::Synth::getEffectBusView(int idx) const noexcept +{ + return (size_t)idx < effectBuses.size() ? effectBuses[idx].get() : nullptr; +} + const sfz::Voice* sfz::Synth::getVoiceView(int idx) const noexcept { return (size_t)idx < voices.size() ? voices[idx].get() : nullptr; diff --git a/src/sfizz/Synth.h b/src/sfizz/Synth.h index 3f94262d..616cf60d 100644 --- a/src/sfizz/Synth.h +++ b/src/sfizz/Synth.h @@ -132,6 +132,14 @@ public: * @return const Region* */ const Voice* getVoiceView(int idx) const noexcept; + /** + * @brief Get a raw view into a specific voice. This is mostly used + * for testing. + * + * @param idx + * @return const Region* + */ + const EffectBus* getEffectBusView(int idx) const noexcept; /** * @brief Get a list of unknown opcodes. The lifetime of the * string views in the code are linked to the currently loaded