aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2021-11-07 11:22:11 -0500
committerGravatar Chris Xiong <chirs241097@gmail.com> 2021-11-07 11:22:11 -0500
commitd561b4f27c6fcce7499ec2ead2722e65aebeae25 (patch)
tree815fff3d02299599846c476b4a3566569e451441
parent0e0d6ff2032c12d48d577f7380d4bfb995fd33dd (diff)
downloadQMidiPlayer-d561b4f27c6fcce7499ec2ead2722e65aebeae25.tar.xz
Expose synth.device-id as an option.
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index 6132234..a139c20 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -441,7 +441,7 @@ void qmpMainWindow::playerSetup(IFluidSettings *fs)
});
}
fs->setOptStr("synth.midi-bank-select", bsmode.c_str());
- fs->setOptInt("synth.device-id", 0x10);
+ fs->setOptInt("synth.device-id", settings->getOptionInt("FluidSynth/DeviceID"));
player->sendSysX(settings->getOptionBool("Midi/SendSysEx"));
}
void qmpMainWindow::loadSoundFont(IFluidSettings *fs)
@@ -489,6 +489,7 @@ void qmpMainWindow::registerMidiOptions()
settings->registerOptionBool("MIDI", "Disable MIDI Mapping", "Midi/DisableMapping", false);
settings->registerOptionBool("MIDI", "Send system exclusive messages", "Midi/SendSysEx", true);
settings->registerOptionBool("MIDI", "Wait for remaining voice before stopping", "Midi/WaitVoice", true);
+ settings->registerOptionInt("MIDI", "Fluidsynth Device ID", "FluidSynth/DeviceID", 0x00, 0x7E, 0x10);
settings->registerOptionEnumInt("MIDI", "Text encoding", "Midi/TextEncoding", {"Unicode", "Big5", "Big5-HKSCS", "CP949", "EUC-JP", "EUC-KR", "GB18030", "KOI8-R", "KOI8-U", "Macintosh", "Shift-JIS"}, 0);
}