/[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 1044 by schoenebeck, Wed Feb 7 21:51:19 2007 UTC revision 1686 by schoenebeck, Thu Feb 14 14:58:50 2008 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2005 - 2007 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 241  namespace LinuxSampler { Line 245  namespace LinuxSampler {
245               * Reset to no RPN controller currently selected.               * Reset to no RPN controller currently selected.
246               */               */
247              void ResetMidiRpnController();              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               * Get currently selected MIDI Registered Parameter Number
# Line 257  namespace LinuxSampler { Line 277  namespace LinuxSampler {
277               */               */
278              int GetMidiRpnController();              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 277  namespace LinuxSampler { Line 326  namespace LinuxSampler {
326              bool    bProgramChangeReceived;              bool    bProgramChangeReceived;
327              bool    bMidiRpnReceived;              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.1044  
changed lines
  Added in v.1686

  ViewVC Help
Powered by ViewVC