aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-06-18 00:51:29 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-06-18 00:51:29 +0800
commit19c89fc7baa299e523e152a14066ebc8ce23af21 (patch)
tree893d2643b57cb03092ab520b64dabff753437bbc /qmidiplayer-desktop/qmpmainwindow.cpp
parent795043d6851a355d70aa2341e2edfd526c24d041 (diff)
downloadQMidiPlayer-19c89fc7baa299e523e152a14066ebc8ce23af21.tar.xz
Device initialization file implementation (part 1).
Added UI for external device configuration. Instrument mapping portion of the device intialization file is now working. Fixed a few spots where return value of getChannelPreset() is ignored. Fixed layout of the preset selection dialog.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index cd00b2e..cc8b80d 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -85,7 +85,12 @@ void qmpMainWindow::init()
rtmididev=new qmpRtMidiManager();
rtmididev->createDevices();
std::vector<std::pair<qmpMidiOutRtMidi*,std::string>> rtdev=rtmididev->getDevices();
- for(auto &i:rtdev)player->registerMidiOutDevice(i.first,i.second);
+ for(auto &i:rtdev)
+ {
+ player->registerMidiOutDevice(i.first,i.second);
+ QString di=qmpSettingsWindow::getSettingsIntf()->value(QString("DevInit/%1").arg(QString::fromStdString(i.second)),"").toString();
+ if(di.length())i.first->setInitializerFile(di.toUtf8().data());
+ }
reloadsynf=new qmpReloadSynthFunc(this);
playerSetup(player->fluid());player->fluid()->deviceInit();
loadSoundFont(player->fluid());