/[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 1130 by iliev, Sun Mar 25 18:59:14 2007 UTC revision 1254 by iliev, Sun Jun 24 20:02:56 2007 UTC
# Line 144  namespace LinuxSampler { Line 144  namespace LinuxSampler {
144      }      }
145    
146      void EngineChannel::SetMidiInstrumentMapToNone() {      void EngineChannel::SetMidiInstrumentMapToNone() {
147            if (iMidiInstrumentMap == NO_MIDI_INSTRUMENT_MAP) return;
148          iMidiInstrumentMap = NO_MIDI_INSTRUMENT_MAP;          iMidiInstrumentMap = NO_MIDI_INSTRUMENT_MAP;
149            StatusChanged(true);
150      }      }
151    
152      void EngineChannel::SetMidiInstrumentMapToDefault() {      void EngineChannel::SetMidiInstrumentMapToDefault() {
153            if (iMidiInstrumentMap == DEFAULT_MIDI_INSTRUMENT_MAP) return;
154          iMidiInstrumentMap = DEFAULT_MIDI_INSTRUMENT_MAP;          iMidiInstrumentMap = DEFAULT_MIDI_INSTRUMENT_MAP;
155            StatusChanged(true);
156      }      }
157    
158      void EngineChannel::SetMidiInstrumentMap(int MidiMap) throw (Exception) {      void EngineChannel::SetMidiInstrumentMap(int MidiMap) throw (Exception) {
159            if (iMidiInstrumentMap == MidiMap) return;
160    
161          // check if given map actually exists in the MIDI instrument mapper          // check if given map actually exists in the MIDI instrument mapper
162          std::vector<int> maps = MidiInstrumentMapper::Maps();          std::vector<int> maps = MidiInstrumentMapper::Maps();
163          if (find(maps.begin(), maps.end(), MidiMap) == maps.end())          if (find(maps.begin(), maps.end(), MidiMap) == maps.end())
164              throw Exception("MIDI instrument map doesn't exist");              throw Exception("MIDI instrument map doesn't exist");
165          iMidiInstrumentMap = MidiMap; // assign the new map ID          iMidiInstrumentMap = MidiMap; // assign the new map ID
166            StatusChanged(true);
167      }      }
168    
169      void EngineChannel::SetMidiRpnControllerMsb(uint8_t CtrlMSB) {      void EngineChannel::SetMidiRpnControllerMsb(uint8_t CtrlMSB) {

Legend:
Removed from v.1130  
changed lines
  Added in v.1254

  ViewVC Help
Powered by ViewVC