aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpplugin.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-08 00:02:14 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-08 00:02:14 +0800
commit1afedc4cc39c1dcbe49f8c99843a1732bf22fa28 (patch)
tree5ab62319767ef25c9c6cc7eaa248a813b1d665c0 /qmidiplayer-desktop/qmpplugin.cpp
parenta00e60541816a99a348add1a84da662bc1a4122d (diff)
downloadQMidiPlayer-1afedc4cc39c1dcbe49f8c99843a1732bf22fa28.tar.xz
First steps for the file reader API.
API additions and changes. Fixed wrong button shown when started from file.
Diffstat (limited to 'qmidiplayer-desktop/qmpplugin.cpp')
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp
index 0c8c04d..5f5d82e 100644
--- a/qmidiplayer-desktop/qmpplugin.cpp
+++ b/qmidiplayer-desktop/qmpplugin.cpp
@@ -165,7 +165,7 @@ std::string qmpPluginAPI::getChannelPresetString(int ch)
return std::string(ret);
}
-void qmpPluginAPI::discardLastEvent(){if(qmw&&qmw->getPlayer())qmw->getPlayer()->discardLastEvent();}
+void qmpPluginAPI::discardCurrentEvent(){if(qmw&&qmw->getPlayer())qmw->getPlayer()->discardCurrentEvent();}
void qmpPluginAPI::commitEventChange(SEventCallBackData d){if(qmw&&qmw->getPlayer())qmw->getPlayer()->commitEventChange(d);}
int qmpPluginAPI::registerEventHandlerIntf(IMidiCallBack *cb,void *userdata)
@@ -184,6 +184,10 @@ int qmpPluginAPI::registerFileReadFinishedHandlerIntf(IMidiCallBack* cb,void* us
{qmw->getPlayer()->setFileReadFinishedCB(cb,userdata);}
void qmpPluginAPI::unregisterFileReadFinishedHandlerIntf(int intfhandle)
{qmw->getPlayer()->unsetFileReadFinishedCB(intfhandle);}
+void qmpPluginAPI::registerFileReader(IMidiFileReader* reader,std::string name)
+{qmw->getPlayer()->registerReader(reader,name);}
+void qmpPluginAPI::unregisterFileReader(std::string name)
+{qmw->getPlayer()->unregisterReader(name);}
void qmpPluginAPI::registerOptionInt(std::string tab,std::string desc,std::string key,int min,int max,int defaultval)
{qsw->registerOptionInt(tab,desc,key,min,max,defaultval);}