aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop/qmpplugin.cpp')
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp10
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);}