From d561b4f27c6fcce7499ec2ead2722e65aebeae25 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sun, 7 Nov 2021 11:22:11 -0500 Subject: Expose synth.device-id as an option. --- qmidiplayer-desktop/qmpmainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qmidiplayer-desktop') 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); } -- cgit v1.2.3