aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2021-01-07 14:09:38 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2021-01-07 14:09:38 +0800
commitea68a817c1947b2001775d42755d260d66f4d37f (patch)
tree3ad0650984c5f442f94fd573a7c74616f193048f /qmidiplayer-desktop/qmpmainwindow.cpp
parent327526848c930c5cca7fafbde36d60ea45b786db (diff)
downloadQMidiPlayer-ea68a817c1947b2001775d42755d260d66f4d37f.tar.xz
Wait voice now checks for output level instead of polyphony.
Fluidsynth sometimes screw up the number of currently sounding voices.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index 05b7ec3..1c825ee 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -379,7 +379,7 @@ void qmpMainWindow::switchTrack(QString s, bool interrupt)
{
player->playerThread();
if (settings->getOptionBool("Midi/WaitVoice") && player->isFinished())
- while (internalfluid->getPolyphone() > 0)
+ while (internalfluid->getOutputLevel() > -100)
std::this_thread::sleep_for(std::chrono::milliseconds(10));
});
#ifdef _WIN32
@@ -534,7 +534,7 @@ void qmpMainWindow::on_pbPlayPause_clicked()
{
player->playerThread();
if (settings->getOptionBool("Midi/WaitVoice") && player->isFinished())
- while (internalfluid->getPolyphone() > 0)
+ while (internalfluid->getOutputLevel() > -100)
std::this_thread::sleep_for(std::chrono::milliseconds(10));
});
#ifdef _WIN32