summaryrefslogtreecommitdiff
path: root/libs/ardour/fluid_synth.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-08-24 05:31:30 +0200
committerRobin Gareus <robin@gareus.org>2016-08-24 05:31:30 +0200
commit8da58c3da02d48adbb6bdd9f2d1489c33a603299 (patch)
treeda008b7c25424a81b212ada4218b35ddf78c1f5c /libs/ardour/fluid_synth.cc
parentcbc5ec764f92fef9784d53a770ea637f74322c63 (diff)
ARDOUR::FluidSynth automatically assign first 16 channels
Diffstat (limited to 'libs/ardour/fluid_synth.cc')
-rw-r--r--libs/ardour/fluid_synth.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/fluid_synth.cc b/libs/ardour/fluid_synth.cc
index df856af561..2978e48181 100644
--- a/libs/ardour/fluid_synth.cc
+++ b/libs/ardour/fluid_synth.cc
@@ -75,6 +75,9 @@ FluidSynth::load_sf2 (const std::string& fn)
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),
@@ -85,8 +88,6 @@ FluidSynth::load_sf2 (const std::string& fn)
return false;
}
- select_program (0, 0);
-
return true;
}