From 9dffdce9078775d92454cefdfb9acf60272509ec Mon Sep 17 00:00:00 2001 From: Jono Targett Date: Mon, 27 May 2024 12:08:04 +0930 Subject: [PATCH] Made file synth output a compile option --- src/synth.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/synth.cpp b/src/synth.cpp index 1a901a2..2628fe3 100644 --- a/src/synth.cpp +++ b/src/synth.cpp @@ -26,14 +26,15 @@ Synth::Synth() { throw new std::runtime_error("Unable to create fluid synth"); } +#ifdef OUPUT_TO_FILE fluid_settings_setstr(settings, "audio.driver", "file"); fluid_settings_setstr(settings, "audio.file.name", "output.raw"); fluid_settings_setstr(settings, "audio.file.format", "s16"); fluid_settings_setstr(settings, "audio.file.type", "raw"); +#endif + fluid_settings_setnum(settings, "synth.sample-rate", 44100); fluid_settings_setnum(settings, "synth.gain", 1.0); - //fluid_settings_setint(settings, "synth.chorus.active", 0); - //fluid_settings_setint(settings, "synth.reverb.active", 0); adriver = new_fluid_audio_driver(settings, synth); if (adriver == nullptr) {