Commit ab3a7692 authored by Gustavo Carneiro's avatar Gustavo Carneiro
Browse files

fix setVolume and setPitch returns.


Signed-off-by: Gustavo Carneiro's avatarGustavo Carneiro <gcarneiroa@hotmail.com>
parent 3f2b5187
......@@ -95,7 +95,7 @@ FluidSynthSoundController::~FluidSynthSoundController()
void FluidSynthSoundController::setPitch(qint8 pitch)
{
if (m_pitch != pitch) { return; }
if (m_pitch == pitch) { return; }
m_pitch = pitch;
fluid_synth_cc(m_synth, 1, 101, 0);
fluid_synth_cc(m_synth, 1, 6, 12);
......@@ -105,7 +105,7 @@ void FluidSynthSoundController::setPitch(qint8 pitch)
void FluidSynthSoundController::setVolume(quint8 volume)
{
if (m_volume != volume) { return; }
if (m_volume == volume) { return; }
m_volume = volume;
fluid_synth_cc(m_synth, 1, 7, m_volume * 127 / 200);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment