this is sometimes resulting in freeing memory which has not yet been malloced. need to understand better what's going on. possibly two concurrent invocations of initialiseSynth racing.

This commit is contained in:
Alex Birch
2018-02-27 23:42:16 +00:00
parent 289ddff4da
commit 7d2cfd27e1

View File

@ -20,10 +20,10 @@ FluidSynthModel::~FluidSynthModel() {
} }
void FluidSynthModel::initialise() { void FluidSynthModel::initialise() {
if (initialised) { // if (initialised) {
delete_fluid_synth(synth); // delete_fluid_synth(synth);
delete_fluid_settings(settings); // delete_fluid_settings(settings);
} // }
settings = new_fluid_settings(); settings = new_fluid_settings();
// https://sourceforge.net/p/fluidsynth/wiki/FluidSettings/ // https://sourceforge.net/p/fluidsynth/wiki/FluidSettings/
fluid_settings_setstr(settings, "synth.verbose", "yes"); fluid_settings_setstr(settings, "synth.verbose", "yes");