gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

commit 9c51ae034e106dfc41961ba2df8485e265b4b00d
parent 5d95ffef8eed79d8998c6919c6ed9361b175570d
Author: Tal Aviram <me@talaviram.com>
Date:   Thu, 23 Sep 2021 23:13:08 +0300

Fix casting instead of rounding. value can be sent from a slider so it needs to be rounded.

Diffstat:
Msource/jucePlugin/VirusParameter.cpp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/jucePlugin/VirusParameter.cpp b/source/jucePlugin/VirusParameter.cpp @@ -17,8 +17,8 @@ namespace Virus void Parameter::valueChanged(juce::Value &) { - const uint8_t value = static_cast<int>(m_value.getValue()); - jassert (m_range.getRange().contains(value) || m_range.end == value); + const uint8_t value = roundToInt(m_value.getValue()); + jassert (m_range.getRange().contains(value) || m_range.end == value); if (value != m_lastValue) { m_ctrl.sendSysEx(