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

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

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

revision 1001 by schoenebeck, Wed Dec 27 16:17:08 2006 UTC revision 1686 by schoenebeck, Thu Feb 14 14:58:50 2008 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *   *   Copyright (C) 2005 - 2008 Christian Schoenebeck                       *
4   *                                                                         *   *                                                                         *
5   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
6   *   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 21  Line 21 
21  #ifndef __LS_ENGINECHANNEL_H__  #ifndef __LS_ENGINECHANNEL_H__
22  #define __LS_ENGINECHANNEL_H__  #define __LS_ENGINECHANNEL_H__
23    
24    #include "../EventListeners.h"
25  #include "../drivers/audio/AudioOutputDevice.h"  #include "../drivers/audio/AudioOutputDevice.h"
26  #include "../drivers/midi/midi.h"  #include "../drivers/midi/midi.h"
27  #include "../drivers/midi/MidiInputDevice.h"  #include "../drivers/midi/MidiInputDevice.h"
28  #include "../drivers/midi/MidiInputPort.h"  #include "../drivers/midi/MidiInputPort.h"
29    #include "../drivers/midi/VirtualMidiDevice.h"
30  #include "Engine.h"  #include "Engine.h"
31  #include "FxSend.h"  #include "FxSend.h"
32    
# Line 88  namespace LinuxSampler { Line 90  namespace LinuxSampler {
90              virtual FxSend* GetFxSend(uint FxSendIndex) = 0;              virtual FxSend* GetFxSend(uint FxSendIndex) = 0;
91              virtual uint    GetFxSendCount() = 0;              virtual uint    GetFxSendCount() = 0;
92              virtual void    RemoveFxSend(FxSend* pFxSend) = 0;              virtual void    RemoveFxSend(FxSend* pFxSend) = 0;
93                virtual void    Connect(VirtualMidiDevice* pDevice) = 0;
94                virtual void    Disconnect(VirtualMidiDevice* pDevice) = 0;
95    
96    
97              /////////////////////////////////////////////////////////////////              /////////////////////////////////////////////////////////////////
# Line 225  namespace LinuxSampler { Line 229  namespace LinuxSampler {
229               */               */
230              void SetMidiInstrumentMap(int MidiMap) throw (Exception);              void SetMidiInstrumentMap(int MidiMap) throw (Exception);
231    
232                /**
233                 * Set MIDI Registered Parameter Number (RPN) Controller
234                 * (upper 8 bits / coarse).
235                 */
236                void SetMidiRpnControllerMsb(uint8_t CtrlMSB);
237    
238                /**
239                 * Set MIDI Registered Parameter Number (RPN) Controller
240                 * (lower 8 bits / fine).
241                 */
242                void SetMidiRpnControllerLsb(uint8_t CtrlLSB);
243    
244                /**
245                 * Reset to no RPN controller currently selected.
246                 */
247                void ResetMidiRpnController();
248                
249                 /**
250                 * Registers the specified listener to be notified when the number
251                 * of effect sends on this channel is changed.
252                 */
253                void AddFxSendCountListener(FxSendCountListener* l);
254    
255                /**
256                 * Removes the specified listener.
257                 */
258                void RemoveFxSendCountListener(FxSendCountListener* l);
259    
260                /**
261                 * Removes all listeners.
262                 */
263                void RemoveAllFxSendCountListeners();
264    
265                /**
266                 * Get currently selected MIDI Registered Parameter Number
267                 * (RPN) Controller, this method will return the already merged
268                 * value (MSB and LSB value).
269                 *
270                 * @e WARNING: you have to call @c ResetMidiRpnController()
271                 * after using this value, otherwise all subsequent MIDI CC #6
272                 * (Data) messages are interpreted as RPN controller value
273                 * messages.
274                 *
275                 * @returns currently selected RPN controller number, a negative
276                 *          value if no RPN controller currently selected
277                 */
278                int GetMidiRpnController();
279    
280                /**
281                 * Gets the current number of active voices.
282                 */
283                uint GetVoiceCount();
284    
285                /**
286                 * Sets the current number of active voices.
287                 */
288                void SetVoiceCount(uint Voices);
289    
290                /**
291                 * Gets the current number of active disk streams.
292                 */
293                uint GetDiskStreamCount();
294    
295                /**
296                 * Sets the current number of active disk streams.
297                 */
298                void SetDiskStreamCount(uint Streams);
299    
300              int iSamplerChannelIndex; ///< FIXME: nasty hack, might be removed (should be 'virtual EngineChannel* EngineChannel() = 0;', but due to cyclic dependencies only a void* solution would be possible ATM)              int iSamplerChannelIndex; ///< FIXME: nasty hack, might be removed (should be 'virtual EngineChannel* EngineChannel() = 0;', but due to cyclic dependencies only a void* solution would be possible ATM)
301    
302          protected:          protected:
303              EngineChannel();              EngineChannel();
304              virtual ~EngineChannel() {}; // MUST only be destroyed by EngineChannelFactory              virtual ~EngineChannel() {}; // MUST only be destroyed by EngineChannelFactory
305    
306                /**
307                 * Notifies listeners that the number of effect sends
308                 * on a this channel is changed.
309                 * @param ChannelId The numerical ID of the sampler channel.
310                 * @param NewCount The new number of sampler channels.
311                 */
312                void fireFxSendCountChanged(int ChannelId, int NewCount);
313    
314              friend class EngineChannelFactory;              friend class EngineChannelFactory;
315    
316          private:          private:
# Line 238  namespace LinuxSampler { Line 319  namespace LinuxSampler {
319              uint8_t uiMidiProgram;              uint8_t uiMidiProgram;
320              uint8_t uiMidiBankMsb;              uint8_t uiMidiBankMsb;
321              uint8_t uiMidiBankLsb;              uint8_t uiMidiBankLsb;
322                uint8_t uiMidiRpnMsb; ///< MIDI Registered Parameter Number (upper 8 bits / coarse)
323                uint8_t uiMidiRpnLsb; ///< MIDI Registered Parameter Number (lower 8 bits / fine)
324              bool    bMidiBankMsbReceived;              bool    bMidiBankMsbReceived;
325              bool    bMidiBankLsbReceived;              bool    bMidiBankLsbReceived;
326              bool    bProgramChangeReceived;              bool    bProgramChangeReceived;
327                bool    bMidiRpnReceived;
328              int     iMidiInstrumentMap;              int     iMidiInstrumentMap;
329                uint    uiVoiceCount;
330                uint    uiDiskStreamCount;
331                ListenerList<FxSendCountListener*> llFxSendCountListeners;
332      };      };
333    
334  } // namespace LinuxSampler  } // namespace LinuxSampler

Legend:
Removed from v.1001  
changed lines
  Added in v.1686

  ViewVC Help
Powered by ViewVC