diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-05-11 23:38:21 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-05-11 23:38:21 +0800 |
commit | 59304aa1b2c6d278e76f72509183fee96bbb8cae (patch) | |
tree | ad50b86aaf71497588372de7089ff71b05b00a7b /qmidiplayer-desktop/qmpplugin.cpp | |
parent | d4c66cbcfb1411312b2c2f3c83e76a4882b8577a (diff) | |
download | QMidiPlayer-59304aa1b2c6d278e76f72509183fee96bbb8cae.tar.xz |
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.
Diffstat (limited to 'qmidiplayer-desktop/qmpplugin.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmpplugin.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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);} |