diff options
author | Chris Xiong <chirs241097@gmail.com> | 2019-06-16 20:12:14 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2019-06-16 20:12:14 +0800 |
commit | 795043d6851a355d70aa2341e2edfd526c24d041 (patch) | |
tree | 203991e9a062934254bc9c6ca2053bdf4c096773 /core/qmpmidiplay.cpp | |
parent | 7b03fd544837fbe0bc5a5373b60dfd5de50892e1 (diff) | |
download | QMidiPlayer-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 'core/qmpmidiplay.cpp')
-rw-r--r-- | core/qmpmidiplay.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp index 28ca9e7..bbf1c3a 100644 --- a/core/qmpmidiplay.cpp +++ b/core/qmpmidiplay.cpp @@ -241,7 +241,7 @@ void CMidiPlayer::fileTimer2Pass() memset(ccc,0,sizeof(ccc));memset(rpnid,0xFF,sizeof(rpnid));memset(rpnval,0xFF,sizeof(rpnval)); for(int i=0;i<16;++i) { - ccc[i][7]=100;ccc[i][8]=64;ccc[i][10]=64;ccc[i][11]=127; + ccc[i][7]=100;ccc[i][8]=64;ccc[i][10]=64; ccc[i][11]=127;ccc[i][71]=64;ccc[i][72]=64; ccc[i][73]=64;ccc[i][74]=64;ccc[i][75]=64; ccc[i][76]=64;ccc[i][77]=64;ccc[i][78]=64; @@ -427,19 +427,6 @@ uint32_t CMidiPlayer::isFinished(){return finished;} void CMidiPlayer::setResumed(){resumed=true;} void CMidiPlayer::setWaitVoice(bool wv){waitvoice=wv;} -void CMidiPlayer::getChannelPreset(int ch,int *b,int *p,char *name) -{ - if(mappedoutput[ch]) - { - *b=((int)chstatus[ch][0]<<7)|chstatus[ch][32]; - *p=chstatus[ch][128]; - strcpy(name,""); - } - else - { - internalFluid->getChannelInfo(ch,b,p,name); - } -} void CMidiPlayer::setChannelPreset(int ch,int b,int p) { chstatus[ch][128]=p; @@ -510,6 +497,10 @@ int CMidiPlayer::getChannelOutput(int ch) { return mappedoutput[ch]; } +qmpMidiOutDevice* CMidiPlayer::getChannelOutputDevice(int ch) +{ + return mididev[mappedoutput[ch]].dev; +} void CMidiPlayer::setChannelOutput(int ch,int outid) { int origoutput=mappedoutput[ch]; |