/[svn]/linuxsampler/trunk/src/engines/EngineChannel.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/EngineChannel.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1041 by schoenebeck, Wed Feb 7 17:45:19 2007 UTC revision 1044 by schoenebeck, Wed Feb 7 21:51:19 2007 UTC
# Line 38  namespace LinuxSampler { Line 38  namespace LinuxSampler {
38          uiMidiBankMsb = 0;          uiMidiBankMsb = 0;
39          uiMidiBankLsb = 0;          uiMidiBankLsb = 0;
40          uiMidiProgram = 0;          uiMidiProgram = 0;
         uiMidiRpnMsb = uiMidiRpnLsb = 0;  
41          bProgramChangeReceived = bMidiBankMsbReceived = bMidiBankLsbReceived = false;          bProgramChangeReceived = bMidiBankMsbReceived = bMidiBankLsbReceived = false;
42          iMidiInstrumentMap = NO_MIDI_INSTRUMENT_MAP;          iMidiInstrumentMap = NO_MIDI_INSTRUMENT_MAP;
43            ResetMidiRpnController();
44      }      }
45    
46      void EngineChannel::SetMute(int state) throw (Exception) {      void EngineChannel::SetMute(int state) throw (Exception) {
# Line 161  namespace LinuxSampler { Line 161  namespace LinuxSampler {
161    
162      void EngineChannel::SetMidiRpnControllerMsb(uint8_t CtrlMSB) {      void EngineChannel::SetMidiRpnControllerMsb(uint8_t CtrlMSB) {
163          uiMidiRpnMsb = CtrlMSB;          uiMidiRpnMsb = CtrlMSB;
164            bMidiRpnReceived = true;
165      }      }
166    
167      void EngineChannel::SetMidiRpnControllerLsb(uint8_t CtrlLSB) {      void EngineChannel::SetMidiRpnControllerLsb(uint8_t CtrlLSB) {
168          uiMidiRpnLsb = CtrlLSB;          uiMidiRpnLsb = CtrlLSB;
169            bMidiRpnReceived = true;
170        }
171    
172        void EngineChannel::ResetMidiRpnController() {
173            uiMidiRpnMsb = uiMidiRpnLsb = 0;
174            bMidiRpnReceived = false;
175      }      }
176    
177      int EngineChannel::GetMidiRpnController() {      int EngineChannel::GetMidiRpnController() {
178          return (uiMidiRpnMsb << 8) | uiMidiRpnLsb;          return (bMidiRpnReceived) ? (uiMidiRpnMsb << 8) | uiMidiRpnLsb : -1;
179      }      }
180    
181  } // namespace LinuxSampler  } // namespace LinuxSampler

Legend:
Removed from v.1041  
changed lines
  Added in v.1044

  ViewVC Help
Powered by ViewVC