aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpplugin.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-12-14 01:14:20 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-12-14 01:14:20 +0800
commitfcd13f9b227d80e066775f75b09bc6ec9337bfc8 (patch)
tree5d673da6cd88275cc03d771c13fa508de9c595be /qmidiplayer-desktop/qmpplugin.cpp
parent8ea9ca158e8a113f38c22fbfa93ad99277b51d26 (diff)
downloadQMidiPlayer-fcd13f9b227d80e066775f75b09bc6ec9337bfc8.tar.xz
Add unified interface for retrieving playback status.
This should make several methods obsolete, however I'm too lazy to migrate them right now. So one more item on the todo list I guess.
Diffstat (limited to 'qmidiplayer-desktop/qmpplugin.cpp')
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp
index ca851ee..c52f486 100644
--- a/qmidiplayer-desktop/qmpplugin.cpp
+++ b/qmidiplayer-desktop/qmpplugin.cpp
@@ -213,6 +213,11 @@ uint32_t qmpPluginAPIImpl::getCurrentPlaybackPercentage()
{
return qmw ? qmw->getPlaybackPercentage() : 0;
}
+
+PlaybackStatus qmpPluginAPIImpl::getPlaybackStatus()
+{
+ return qmw ? qmw->getPlaybackStatus() : PlaybackStatus{false, 0, 0, 0, 0};
+}
int qmpPluginAPIImpl::getChannelCC(int ch, int cc)
{
return qmw && qmw->getPlayer() ? qmw->getPlayer()->getCC(ch, cc) : 0;