aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-10-05 23:04:53 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-10-05 23:04:53 +0800
commit8cf35c5ceb10d5c54e933127fb60c5034ef8a149 (patch)
tree21d68963030f0fca87eef2e8503e32c97ceb0553 /qmidiplayer-desktop/qmpmainwindow.cpp
parent5ad76bb13ecc29aeb5b2b71cb33a00add44c5b35 (diff)
downloadQMidiPlayer-8cf35c5ceb10d5c54e933127fb60c5034ef8a149.tar.xz
Replaced the option "default output device" with a more powerful one.
Old code for default output device completely removed.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index 76cd221..0bcf070 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -52,9 +52,8 @@ qmpMainWindow::~qmpMainWindow()
delete a[i];
}
pmgr->deinitPlugins();
- std::vector<std::pair<qmpMidiOutRtMidi*,std::string>> rtdev=rtmididev->getDevices();
+ auto rtdev=qmpRtMidiManager::getDevices();
for(auto &i:rtdev)player->unregisterMidiOutDevice(i.second);
- rtmididev->deleteDevices();
delete pmgr;
if(timer)delete timer;
delete helpw;helpw=nullptr;
@@ -83,9 +82,7 @@ void qmpMainWindow::init()
[this]
{
player=new CMidiPlayer();
- rtmididev=new qmpRtMidiManager();
- rtmididev->createDevices();
- std::vector<std::pair<qmpMidiOutRtMidi*,std::string>> rtdev=rtmididev->getDevices();
+ auto rtdev=qmpRtMidiManager::getDevices();
for(auto &i:rtdev)
{
player->registerMidiOutDevice(i.first,i.second);
@@ -133,7 +130,7 @@ void qmpMainWindow::init()
ui->pbSettings->setIcon(QIcon(getThemedIcon(":/img/settings.svg")));
ui->pbAdd->setIcon(QIcon(getThemedIcon(":/img/open.svg")));
if(argfiles.size())on_pbPlayPause_clicked();
- setupWidget();settingsw->verifySF();
+ setupWidget();settingsw->postInit();
}
int qmpMainWindow::parseArgs()