From 59304aa1b2c6d278e76f72509183fee96bbb8cae Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 11 May 2016 23:38:21 +0800 Subject: Fixed a crash caused by the visualization plugin. Fixed a bug when piano is hidden but the option "arrange channels on a stair" is enabled. Add channel label display. However it's still buggy so it's currently disabled. --- qmidiplayer-desktop/qmpplugin.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'qmidiplayer-desktop/qmpplugin.cpp') diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp index b05ca0c..d67e08a 100644 --- a/qmidiplayer-desktop/qmpplugin.cpp +++ b/qmidiplayer-desktop/qmpplugin.cpp @@ -113,6 +113,16 @@ bool qmpPluginAPI::getChannelMask(int ch) {return qmw&&qmw->getPlayer()?qmw->getPlayer()->getChannelMask(ch):false;} std::string qmpPluginAPI::getTitle() {return qmw?qmw->getTitle():"";} +std::string qmpPluginAPI::getChannelPresetString(int ch) +{ + int b,p;char nm[25],ret[33];ret[0]=0; + if(qmw&&qmw->getPlayer()) + { + qmw->getPlayer()->getChannelPreset(ch,&b,&p,nm); + sprintf(ret,"%03d:%03d %s",b,p,nm); + } + return std::string(ret); +} int qmpPluginAPI::registerEventHandlerIntf(IMidiCallBack *cb,void *userdata) {return qmw->getPlayer()->setEventHandlerCB(cb,userdata);} -- cgit v1.2.3