aboutsummaryrefslogtreecommitdiff
path: root/include/qmpcorepublic.hpp
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 /include/qmpcorepublic.hpp
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 'include/qmpcorepublic.hpp')
-rw-r--r--include/qmpcorepublic.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/qmpcorepublic.hpp b/include/qmpcorepublic.hpp
index 8376af8..242ca58 100644
--- a/include/qmpcorepublic.hpp
+++ b/include/qmpcorepublic.hpp
@@ -70,6 +70,14 @@ public:
if (copyright)delete[] copyright;
}
};
+struct PlaybackStatus
+{
+ bool paused;
+ uint64_t curtime_ms;
+ uint64_t maxtime_ms;
+ uint64_t curtick;
+ uint64_t maxtick;
+};
//Generic callback function that can be used for hooking the core.
//"userdata" is set when you register the callback function.
//Deprecated. Removing in 0.9.x.
@@ -160,6 +168,7 @@ extern "C" {
virtual uint32_t getMaxPolyphone() = 0;
virtual uint32_t getCurrentTimeStamp() = 0;
virtual uint32_t getCurrentPlaybackPercentage() = 0;
+ virtual PlaybackStatus getPlaybackStatus() = 0;
virtual int getChannelCC(int ch, int cc) = 0;
virtual int getChannelPreset(int ch) = 0;
virtual void playerSeek(uint32_t percentage) = 0;