aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
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 1c825ee..1198559 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->getOutputLevel() > -100)
+ while (internalfluid->getOutputLevel() > -100 && internalfluid->getPolyphone() > 0)
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->getOutputLevel() > -100)
+ while (internalfluid->getOutputLevel() > -100 && internalfluid->getPolyphone() > 0)
std::this_thread::sleep_for(std::chrono::milliseconds(10));
});
#ifdef _WIN32