From 795043d6851a355d70aa2341e2edfd526c24d041 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sun, 16 Jun 2019 20:12:14 +0800 Subject: 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. --- core/qmpmidiplay.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'core/qmpmidiplay.cpp') 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]; -- cgit v1.2.3