summaryrefslogtreecommitdiff
path: root/libs/ardour/fluid_synth.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-08-24 22:39:44 +0200
committerRobin Gareus <robin@gareus.org>2016-08-24 22:39:44 +0200
commitaf786cf44489fec2573168276d690fa0f66fa6ef (patch)
treeee6d6a8798eb79cf0ab9f2d0a797936a9f46ab70 /libs/ardour/fluid_synth.cc
parentef59ea849b2ef4173191a7e0677d42d0b7b10a97 (diff)
NO-OP: whitespace
Diffstat (limited to 'libs/ardour/fluid_synth.cc')
-rw-r--r--libs/ardour/fluid_synth.cc76
1 files changed, 38 insertions, 38 deletions
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