diff options
Diffstat (limited to 'audio')
-rw-r--r-- | audio/softsynth/fluidsynth.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp index 1e78a7b5e3..5c14f33a60 100644 --- a/audio/softsynth/fluidsynth.cpp +++ b/audio/softsynth/fluidsynth.cpp @@ -88,15 +88,26 @@ MidiDriver_FluidSynth::MidiDriver_FluidSynth(Audio::Mixer *mixer) } void MidiDriver_FluidSynth::setInt(const char *name, int val) { - fluid_settings_setint(_settings, name, val); + char *name2 = scumm_strdup(name); + + fluid_settings_setint(_settings, name2, val); + free(name2); } void MidiDriver_FluidSynth::setNum(const char *name, double val) { - fluid_settings_setnum(_settings, name, val); + char *name2 = scumm_strdup(name); + + fluid_settings_setnum(_settings, name2, val); + free(name2); } void MidiDriver_FluidSynth::setStr(const char *name, const char *val) { - fluid_settings_setstr(_settings, name, val); + char *name2 = scumm_strdup(name); + char *val2 = scumm_strdup(val); + + fluid_settings_setstr(_settings, name2, val2); + free(name2); + free(val2); } int MidiDriver_FluidSynth::open() { |