diff options
author | Chris Xiong <chirs241097@gmail.com> | 2019-05-25 22:40:15 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2019-05-25 22:40:15 +0800 |
commit | 3f72121ac41741d53e4916f1275cbd4f93259c4d (patch) | |
tree | 15bba079c86de0e241812cd657ad190eb0c2c41a /visualization/qmpvisualization.hpp | |
parent | eba45fdf11a98113b439db0510b55f14845db8fb (diff) | |
download | QMidiPlayer-3f72121ac41741d53e4916f1275cbd4f93259c4d.tar.xz |
Massive code refactor en cours!
Less complain from compilers:
- use nullptr instead of NULL
- use types for event fields
- explicit type casting added
Stop saving parameters of meta events in p1/p2 fields of SEvent.
callback_t now uses std::function, deprecating ICallback.
Not recommended for daily usage, or even testing: the code refactor
is still a work in progress.
Diffstat (limited to 'visualization/qmpvisualization.hpp')
-rw-r--r-- | visualization/qmpvisualization.hpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/visualization/qmpvisualization.hpp b/visualization/qmpvisualization.hpp index 23be1a9..4e0412b 100644 --- a/visualization/qmpvisualization.hpp +++ b/visualization/qmpvisualization.hpp @@ -18,7 +18,7 @@ class CReaderCallBack:public ICallBack qmpVisualization *par; public: CReaderCallBack(qmpVisualization *_par){par=_par;} - void callBack(void *callerdata,void *userdata); + void callBack(const void *callerdata,void *userdata); }; class CEventHandlerCallBack:public ICallBack { @@ -26,7 +26,7 @@ class CEventHandlerCallBack:public ICallBack qmpVisualization *par; public: CEventHandlerCallBack(qmpVisualization *_par){par=_par;} - void callBack(void*,void*); + void callBack(const void*,void*); }; class CFRFinishedCallBack:public ICallBack { @@ -34,7 +34,7 @@ class CFRFinishedCallBack:public ICallBack qmpVisualization *par; public: CFRFinishedCallBack(qmpVisualization *_par){par=_par;} - void callBack(void*,void*); + void callBack(const void*,void*); }; struct MidiVisualEvent { @@ -95,11 +95,6 @@ class qmpVisualization:public qmpPluginIntf,public qmpFuncBaseIntf void deinit(); const char* pluginGetName(); const char* pluginGetVersion(); - - static void cbstart(void* cbd,void* usrd); - static void cbstop(void* cbd,void* usrd); - static void cbpause(void* cbd,void* usrd); - static void cbreset(void* cbd,void* usrd); }; class CMidiVisualHandler:public smHandler |