From fcd13f9b227d80e066775f75b09bc6ec9337bfc8 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 14 Dec 2020 01:14:20 +0800 Subject: 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. --- include/qmpcorepublic.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/qmpcorepublic.hpp') 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; -- cgit v1.2.3