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 5d053d35a3d77b9d904bb52033dcd8ae4bf23079
parent 3377e370684ed010d5b38007bbd151252661e243
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(