From f8d26cf5f8495515260445589fbed84526525612 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 31 Dec 2022 21:27:53 +0100 Subject: [PATCH] Restore compatibility with FluidSynth < 2.2 --- src/MidiDeviceFluidSynth.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/MidiDeviceFluidSynth.cpp b/src/MidiDeviceFluidSynth.cpp index 1b1c422..2e37e6c 100644 --- a/src/MidiDeviceFluidSynth.cpp +++ b/src/MidiDeviceFluidSynth.cpp @@ -111,8 +111,13 @@ bool CMidiDeviceFluidSynth::openMidiPort(midiType_t type, QString portName) // Create the synthesizer. m_synth = new_fluid_synth(m_fluidSettings); +#if (FLUIDSYNTH_VERSION_MAJOR >= 2) && (FLUIDSYNTH_VERSION_MINOR >= 2) fluid_synth_reverb_on(m_synth, -1, 0); fluid_synth_chorus_on(m_synth, -1, 0); +#else + fluid_synth_set_reverb_on(m_synth, 0); + fluid_synth_set_chorus_on(m_synth, 0); +#endif // Create the audio driver. m_audioDriver = new_fluid_audio_driver(m_fluidSettings, m_synth);