/[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 973 by schoenebeck, Fri Dec 15 21:40:27 2006 UTC revision 1130 by iliev, Sun Mar 25 18:59:14 2007 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *   *   Copyright (C) 2005 - 2007 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 40  namespace LinuxSampler { Line 40  namespace LinuxSampler {
40          uiMidiProgram = 0;          uiMidiProgram = 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 158  namespace LinuxSampler { Line 159  namespace LinuxSampler {
159          iMidiInstrumentMap = MidiMap; // assign the new map ID          iMidiInstrumentMap = MidiMap; // assign the new map ID
160      }      }
161    
162        void EngineChannel::SetMidiRpnControllerMsb(uint8_t CtrlMSB) {
163            uiMidiRpnMsb = CtrlMSB;
164            bMidiRpnReceived = true;
165        }
166    
167        void EngineChannel::SetMidiRpnControllerLsb(uint8_t CtrlLSB) {
168            uiMidiRpnLsb = CtrlLSB;
169            bMidiRpnReceived = true;
170        }
171    
172        void EngineChannel::ResetMidiRpnController() {
173            uiMidiRpnMsb = uiMidiRpnLsb = 0;
174            bMidiRpnReceived = false;
175        }
176    
177        int EngineChannel::GetMidiRpnController() {
178            return (bMidiRpnReceived) ? (uiMidiRpnMsb << 8) | uiMidiRpnLsb : -1;
179        }
180    
181        void EngineChannel::AddFxSendCountListener(FxSendCountListener* l) {
182            llFxSendCountListeners.AddListener(l);
183        }
184    
185        void EngineChannel::RemoveFxSendCountListener(FxSendCountListener* l) {
186            llFxSendCountListeners.RemoveListener(l);
187        }
188    
189        void EngineChannel::RemoveAllFxSendCountListeners() {
190            llFxSendCountListeners.RemoveAllListeners();
191        }
192    
193        void EngineChannel::fireFxSendCountChanged(int ChannelId, int NewCount) {
194            for (int i = 0; i < llFxSendCountListeners.GetListenerCount(); i++) {
195                llFxSendCountListeners.GetListener(i)->FxSendCountChanged(ChannelId, NewCount);
196            }
197        }
198    
199  } // namespace LinuxSampler  } // namespace LinuxSampler

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

  ViewVC Help
Powered by ViewVC