diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/qmpcorepublic.hpp | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/include/qmpcorepublic.hpp b/include/qmpcorepublic.hpp index ad6a165..3654a75 100644 --- a/include/qmpcorepublic.hpp +++ b/include/qmpcorepublic.hpp @@ -4,8 +4,8 @@ #include <string> struct SEventCallBackData { - uint32_t type,p1,p2; - SEventCallBackData(uint32_t _t,uint32_t _p1,uint32_t _p2){type=_t;p1=_p1;p2=_p2;} + uint32_t time,type,p1,p2; + SEventCallBackData(uint32_t _t,uint32_t _p1,uint32_t _p2,uint32_t _tm){type=_t;p1=_p1;p2=_p2;time=_tm;} }; class IMidiCallBack { @@ -17,6 +17,7 @@ class IMidiCallBack class qmpPluginIntf { public: + qmpPluginIntf(){} virtual ~qmpPluginIntf(){} virtual void init(){} virtual void deinit(){} @@ -26,34 +27,40 @@ class qmpPluginIntf class qmpVisualizationIntf { public: - virtual void show(); - virtual void close(); + qmpVisualizationIntf(){} + virtual void show()=0; + virtual void close()=0; + virtual void start()=0; + virtual void stop()=0; + virtual void pause()=0; + virtual void reset()=0; + virtual ~qmpVisualizationIntf(){} }; extern "C"{ class qmpPluginAPI { public: - uint32_t getDivision(); - uint32_t getRawTempo(); - double getRealTempo(); - uint32_t getTimeSig(); - int getKeySig(); - uint32_t getNoteCount(); - uint32_t getCurrentPolyphone(); - uint32_t getMaxPolyphone(); - uint32_t getCurrentTimeStamp(); - int registerVisualizationIntf(qmpVisualizationIntf* i); - void unregisterVisualizationIntf(int intfhandle); - int registerEventReaderIntf(IMidiCallBack* cb,void* userdata); - void unregisterEventReaderIntf(int intfhandle); - int registerEventHandlerIntf(IMidiCallBack* cb,void* userdata); - void unregisterEventHandlerIntf(int intfhandle); - void registerOptionInt(std::string desc,std::string key,int defaultval); - int getOptionInt(std::string key); - void registerOptionDouble(std::string desc,std::string key,double defaultval); - double getOptionDouble(std::string key); - void registerOptionString(std::string desc,std::string key,std::string defaultval); - std::string getOptionString(std::string key); + virtual uint32_t getDivision(); + virtual uint32_t getRawTempo(); + virtual double getRealTempo(); + virtual uint32_t getTimeSig(); + virtual int getKeySig(); + virtual uint32_t getNoteCount(); + virtual uint32_t getCurrentPolyphone(); + virtual uint32_t getMaxPolyphone(); + virtual uint32_t getCurrentTimeStamp(); + virtual int registerVisualizationIntf(qmpVisualizationIntf* i); + virtual void unregisterVisualizationIntf(int intfhandle); + virtual int registerEventReaderIntf(IMidiCallBack* cb,void* userdata); + virtual void unregisterEventReaderIntf(int intfhandle); + virtual int registerEventHandlerIntf(IMidiCallBack* cb,void* userdata); + virtual void unregisterEventHandlerIntf(int intfhandle); + virtual void registerOptionInt(std::string desc,std::string key,int defaultval); + virtual int getOptionInt(std::string key); + virtual void registerOptionDouble(std::string desc,std::string key,double defaultval); + virtual double getOptionDouble(std::string key); + virtual void registerOptionString(std::string desc,std::string key,std::string defaultval); + virtual std::string getOptionString(std::string key); }; } typedef qmpPluginIntf*(*qmpPluginEntry)(qmpPluginAPI*); |