aboutsummaryrefslogtreecommitdiff
path: root/core/qmpmidiplay.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-23 23:50:31 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-23 23:50:31 +0800
commitaa8af83ff8889aa136e9152b2cca9a88d99c5f47 (patch)
tree54af0c407c08d86c1fbf5e5856ee66c4f80e1b0b /core/qmpmidiplay.hpp
parent446263beafeafa831530a6f9711aa891955b7db3 (diff)
downloadQMidiPlayer-aa8af83ff8889aa136e9152b2cca9a88d99c5f47.tar.xz
Add stubs for plugin support.
Diffstat (limited to 'core/qmpmidiplay.hpp')
-rw-r--r--core/qmpmidiplay.hpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/core/qmpmidiplay.hpp b/core/qmpmidiplay.hpp
index 9bb6323..4f3b50f 100644
--- a/core/qmpmidiplay.hpp
+++ b/core/qmpmidiplay.hpp
@@ -2,10 +2,10 @@
#ifndef QMPMIDIPLAY_H
#define QMPMIDIPLAY_H
#include <cstring>
-#include <cstdint>
#include <cstdlib>
#include <vector>
#include <fluidsynth.h>
+#include "../include/qmpcorepublic.hpp"
#include "qmpmidimappers.hpp"
struct SEvent
{
@@ -21,13 +21,6 @@ struct SEvent
if(s){str=new char[strlen(s)+2];strcpy(str,s);}else str=NULL;
}
};
-class CMidiCallBack
-{
- public:
- CMidiCallBack(){}
- virtual void callBack(void* data)=0;
- virtual ~CMidiCallBack(){}
-};
class CMidiFile
{
private:
@@ -83,7 +76,7 @@ class CMidiPlayer
qmpMidiMapperRtMidi *mapper;
int mappedoutput[16],deviceusage[16],deviceiid[128];
uint8_t chstate[16],chstatus[16][130];//0..127: cc 128: pc
- CMidiCallBack *noteOnCB;
+ IMidiCallBack *noteOnCB;
void* noteOnCBUserData;
void setBit(uint16_t &n,uint16_t bn,uint16_t b);
@@ -126,6 +119,7 @@ class CMidiPlayer
uint32_t getFileNoteCount();
uint32_t getFileStandard();
double getTempo();
+ uint32_t getDivision();
const char* getTitle();
const char* getCopyright();
@@ -154,6 +148,6 @@ class CMidiPlayer
qmpMidiMapperRtMidi* getMidiMapper();
void setChannelOutput(int ch,int devid);
uint8_t* getChstates();
- void setNoteOnCallBack(CMidiCallBack *cb,void *userdata);
+ void setNoteOnCallBack(IMidiCallBack *cb,void *userdata);
};
#endif