From af786cf44489fec2573168276d690fa0f66fa6ef Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 24 Aug 2016 22:39:44 +0200 Subject: NO-OP: whitespace --- libs/ardour/fluid_synth.cc | 76 +++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'libs/ardour/fluid_synth.cc') diff --git a/libs/ardour/fluid_synth.cc b/libs/ardour/fluid_synth.cc index 30d70bb876..3c013dd00d 100644 --- a/libs/ardour/fluid_synth.cc +++ b/libs/ardour/fluid_synth.cc @@ -60,44 +60,44 @@ FluidSynth::~FluidSynth () bool FluidSynth::load_sf2 (const std::string& fn) { - _synth_id = fluid_synth_sfload (_synth, fn.c_str (), 1); - if (_synth_id == FLUID_FAILED) { - return false; - } - - fluid_sfont_t* const sfont = fluid_synth_get_sfont_by_id (_synth, _synth_id); - if (!sfont) { - return false; - } - - size_t count; - fluid_preset_t preset; - - sfont->iteration_start (sfont); - for (count = 0; sfont->iteration_next (sfont, &preset) != 0; ++count) { - if (count < 16) { - fluid_synth_program_select (_synth, count, _synth_id, preset.get_banknum (&preset), preset.get_num (&preset)); - } - _presets.push_back (BankProgram ( - preset.get_name (&preset), - preset.get_banknum (&preset), - preset.get_num (&preset))); - } - - if (count == 0) { - return false; - } - - /* boostrap synth engine. The first call re-initializes the choruscw - * (fluid_rvoice_mixer_set_samplerate) which is not rt-safe. - */ - float l[1024]; - float r[1024]; - fluid_synth_all_notes_off (self->synth, -1); - fluid_synth_all_sounds_off (self->synth, -1); - fluid_synth_write_float (self->synth, 1024, l, 0, 1, r, 0, 1); - - return true; + _synth_id = fluid_synth_sfload (_synth, fn.c_str (), 1); + if (_synth_id == FLUID_FAILED) { + return false; + } + + fluid_sfont_t* const sfont = fluid_synth_get_sfont_by_id (_synth, _synth_id); + if (!sfont) { + return false; + } + + size_t count; + fluid_preset_t preset; + + sfont->iteration_start (sfont); + for (count = 0; sfont->iteration_next (sfont, &preset) != 0; ++count) { + if (count < 16) { + fluid_synth_program_select (_synth, count, _synth_id, preset.get_banknum (&preset), preset.get_num (&preset)); + } + _presets.push_back (BankProgram ( + preset.get_name (&preset), + preset.get_banknum (&preset), + preset.get_num (&preset))); + } + + if (count == 0) { + return false; + } + + /* boostrap synth engine. The first call re-initializes the chorus + * (fluid_rvoice_mixer_set_samplerate) which is not rt-safe. + */ + float l[1024]; + float r[1024]; + fluid_synth_all_notes_off (self->synth, -1); + fluid_synth_all_sounds_off (self->synth, -1); + fluid_synth_write_float (self->synth, 1024, l, 0, 1, r, 0, 1); + + return true; } bool -- cgit v1.2.3