summaryrefslogtreecommitdiff
path: root/libs/ardour/fluid_synth.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-08-24 21:32:45 +0200
committerRobin Gareus <robin@gareus.org>2016-08-24 22:37:20 +0200
commitef59ea849b2ef4173191a7e0677d42d0b7b10a97 (patch)
treefe83d9ea45266cbb11eff7e05587b62dc94aed28 /libs/ardour/fluid_synth.cc
parent7ccbc0ca73055bafba07d8a5a785ca3bf1c8cb74 (diff)
lessons learned from a-fluidsynth
Diffstat (limited to 'libs/ardour/fluid_synth.cc')
-rw-r--r--libs/ardour/fluid_synth.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/fluid_synth.cc b/libs/ardour/fluid_synth.cc
index 2978e48181..30d70bb876 100644
--- a/libs/ardour/fluid_synth.cc
+++ b/libs/ardour/fluid_synth.cc
@@ -88,6 +88,15 @@ FluidSynth::load_sf2 (const std::string& fn)
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;
}