aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-06-16 20:12:14 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-06-16 20:12:14 +0800
commit795043d6851a355d70aa2341e2edfd526c24d041 (patch)
tree203991e9a062934254bc9c6ca2053bdf4c096773 /include
parent7b03fd544837fbe0bc5a5373b60dfd5de50892e1 (diff)
downloadQMidiPlayer-795043d6851a355d70aa2341e2edfd526c24d041.tar.xz
Inital implementation of the device properties API.
Added new interfaces to qmpMidiOutDevice. Implemented the new interfaces for qmpMidiOutFluid. Initial infra for device initialization file parsing. Move to the new interfaces for getting list of presets. Use DevIL instead of CxImage. External output devices are broken now but that is for another commit.
Diffstat (limited to 'include')
-rw-r--r--include/qmpcorepublic.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/qmpcorepublic.hpp b/include/qmpcorepublic.hpp
index a4949ac..34e4ea6 100644
--- a/include/qmpcorepublic.hpp
+++ b/include/qmpcorepublic.hpp
@@ -24,6 +24,8 @@ struct SEvent
p1=_p1;p2=_p2;flags=0;
if(s)str=std::string(s);else str="";
}
+ SEvent(uint32_t _iid,uint32_t _t,uint8_t _tp,uint8_t _p1,uint8_t _p2,std::string s):
+ iid(_iid),time(_t),type(_tp),p1(_p1),p2(_p2),str(s){}
friend bool operator <(const SEvent& a,const SEvent& b){return a.time-b.time?a.time<b.time:a.iid<b.iid;}
};
//MIDI Track class
@@ -92,6 +94,11 @@ class qmpMidiOutDevice
virtual void reset(uint8_t ch)=0;
virtual void onMapped(uint8_t ch,int refcnt)=0;
virtual void onUnmapped(uint8_t ch,int refcnt)=0;
+ virtual std::vector<std::pair<uint16_t,std::string>> getBankList()=0;
+ virtual std::vector<std::pair<uint8_t,std::string>> getPresets(int bank)=0;
+ virtual std::string getPresetName(uint16_t bank,uint8_t preset)=0;
+ virtual bool getChannelPreset(int ch,uint16_t *bank,uint8_t *preset,std::string &presetname)=0;
+ virtual uint8_t getInitialCCValue(uint8_t cc)=0;
virtual ~qmpMidiOutDevice(){}
};
//Main plugin interface.