aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-30 01:12:38 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-30 01:12:38 +0800
commitbd165c0254b9095bb9e5ea54def56b6404033ebe (patch)
treee6e965ff343c0cd4feea0180dd63522e05085567 /qmidiplayer-desktop
parent8766f3b12e13d40b65eca23a850f687b0043d022 (diff)
downloadQMidiPlayer-bd165c0254b9095bb9e5ea54def56b6404033ebe.tar.xz
Add visualization renderer.
Add API for getting raw pitch bend values. Fix non-compliant RPN handling. The visualization renderer is still at the "proof-of-concept" stage. It's not very usable (yet).
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp5
-rw-r--r--qmidiplayer-desktop/qmpplugin.hpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp
index 4785b16..9cd1f35 100644
--- a/qmidiplayer-desktop/qmpplugin.cpp
+++ b/qmidiplayer-desktop/qmpplugin.cpp
@@ -167,6 +167,11 @@ void qmpPluginAPIImpl::playerSeek(uint32_t percentage)
{if(qmw)qmw->playerSeek(percentage);}
double qmpPluginAPIImpl::getPitchBend(int ch)
{return qmw&&qmw->getPlayer()?qmw->getPlayer()->getPitchBend(ch):0;}
+void qmpPluginAPIImpl::getPitchBendRaw(int ch,uint32_t *pb,uint32_t *pbr)
+{
+ if(qmw&&qmw->getPlayer())
+ qmw->getPlayer()->getPitchBendRaw(ch,pb,pbr);
+}
bool qmpPluginAPIImpl::getChannelMask(int ch)
{return qmw&&qmw->getPlayer()?qmw->getPlayer()->getChannelMask(ch):false;}
std::string qmpPluginAPIImpl::getTitle()
diff --git a/qmidiplayer-desktop/qmpplugin.hpp b/qmidiplayer-desktop/qmpplugin.hpp
index 08343cd..99dedcd 100644
--- a/qmidiplayer-desktop/qmpplugin.hpp
+++ b/qmidiplayer-desktop/qmpplugin.hpp
@@ -35,6 +35,7 @@ public:
int getChannelPreset(int ch);
void playerSeek(uint32_t percentage);
double getPitchBend(int ch);
+ void getPitchBendRaw(int ch,uint32_t *pb,uint32_t *pbr);
bool getChannelMask(int ch);
std::string getTitle();
std::wstring getWTitle();