From 93bca10a45a776431663106b51dfc3c3174616a2 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Tue, 28 Jul 2020 14:55:15 +0200 Subject: [PATCH] Voice accessor without const qualifier --- src/sfizz/Synth.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sfizz/Synth.h b/src/sfizz/Synth.h index d7f481af..c04b13d0 100644 --- a/src/sfizz/Synth.h +++ b/src/sfizz/Synth.h @@ -210,6 +210,17 @@ public: * @return const Voice* */ const Voice* getVoiceById(NumericId id) const noexcept; + /** + * @brief Find the voice which is associated with the given identifier. + * + * @param id + * @return Voice* + */ + Voice* getVoiceById(NumericId id) noexcept + { + return const_cast( + const_cast(this)->getVoiceById(id)); + } /** * @brief Get a raw view into a specific region. This is mostly used * for testing.