13
0

NO-OP: whitespace

This commit is contained in:
Robin Gareus 2016-08-24 22:39:44 +02:00
parent ef59ea849b
commit af786cf444

View File

@ -60,44 +60,44 @@ FluidSynth::~FluidSynth ()
bool bool
FluidSynth::load_sf2 (const std::string& fn) FluidSynth::load_sf2 (const std::string& fn)
{ {
_synth_id = fluid_synth_sfload (_synth, fn.c_str (), 1); _synth_id = fluid_synth_sfload (_synth, fn.c_str (), 1);
if (_synth_id == FLUID_FAILED) { if (_synth_id == FLUID_FAILED) {
return false; return false;
} }
fluid_sfont_t* const sfont = fluid_synth_get_sfont_by_id (_synth, _synth_id); fluid_sfont_t* const sfont = fluid_synth_get_sfont_by_id (_synth, _synth_id);
if (!sfont) { if (!sfont) {
return false; return false;
} }
size_t count; size_t count;
fluid_preset_t preset; fluid_preset_t preset;
sfont->iteration_start (sfont); sfont->iteration_start (sfont);
for (count = 0; sfont->iteration_next (sfont, &preset) != 0; ++count) { for (count = 0; sfont->iteration_next (sfont, &preset) != 0; ++count) {
if (count < 16) { if (count < 16) {
fluid_synth_program_select (_synth, count, _synth_id, preset.get_banknum (&preset), preset.get_num (&preset)); fluid_synth_program_select (_synth, count, _synth_id, preset.get_banknum (&preset), preset.get_num (&preset));
} }
_presets.push_back (BankProgram ( _presets.push_back (BankProgram (
preset.get_name (&preset), preset.get_name (&preset),
preset.get_banknum (&preset), preset.get_banknum (&preset),
preset.get_num (&preset))); preset.get_num (&preset)));
} }
if (count == 0) { if (count == 0) {
return false; return false;
} }
/* boostrap synth engine. The first call re-initializes the choruscw /* boostrap synth engine. The first call re-initializes the chorus
* (fluid_rvoice_mixer_set_samplerate) which is not rt-safe. * (fluid_rvoice_mixer_set_samplerate) which is not rt-safe.
*/ */
float l[1024]; float l[1024];
float r[1024]; float r[1024];
fluid_synth_all_notes_off (self->synth, -1); fluid_synth_all_notes_off (self->synth, -1);
fluid_synth_all_sounds_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); fluid_synth_write_float (self->synth, 1024, l, 0, 1, r, 0, 1);
return true; return true;
} }
bool bool