From 6e88039085525fbf906743e481aac440bce530c6 Mon Sep 17 00:00:00 2001 From: Alex Birch Date: Tue, 17 Apr 2018 22:10:01 +0100 Subject: [PATCH] we don't need an audio driver anyway --- Source/FluidSynthModel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/FluidSynthModel.cpp b/Source/FluidSynthModel.cpp index 90dc73b..89db518 100644 --- a/Source/FluidSynthModel.cpp +++ b/Source/FluidSynthModel.cpp @@ -34,9 +34,14 @@ void FluidSynthModel::initialise() { // delete_fluid_synth(synth); // delete_fluid_settings(settings); // } + // deactivate all audio drivers in fluidsynth to avoid FL Studio deadlock when initialising CoreAudio + // after all: we only use fluidsynth to render blocks of audio. it doesn't output to audio driver. + const char *DRV[] = {NULL}; + fluid_audio_driver_register(DRV); + settings = new_fluid_settings(); // https://sourceforge.net/p/fluidsynth/wiki/FluidSettings/ - fluid_settings_setstr(settings, "synth.verbose", "yes"); +// fluid_settings_setstr(settings, "synth.verbose", "yes"); synth = new_fluid_synth(settings); fluid_synth_set_sample_rate(synth, currentSampleRate);