/[svn]/linuxsampler/trunk/src/drivers/audio/AudioOutputDevice.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/audio/AudioOutputDevice.h

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

revision 890 by schoenebeck, Sat Jul 1 13:43:04 2006 UTC revision 2198 by iliev, Sun Jul 3 18:06:51 2011 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 - 2010 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 36  Line 36 
36  #include "../../engines/Engine.h"  #include "../../engines/Engine.h"
37  #include "AudioChannel.h"  #include "AudioChannel.h"
38  #include "../../common/SynchronizedConfig.h"  #include "../../common/SynchronizedConfig.h"
39    #include "../../effects/EffectChain.h"
40    
41  namespace LinuxSampler {  namespace LinuxSampler {
42    
43      // just symbol prototyping      // just symbol prototyping
44      class Engine;      class Engine;
45        class AudioOutputDeviceFactory;
46        class IDGenerator;
47    
48      /** Abstract base class for audio output drivers in LinuxSampler      /** Abstract base class for audio output drivers in LinuxSampler
49       *       *
# Line 87  namespace LinuxSampler { Line 90  namespace LinuxSampler {
90                      virtual optional<int>    RangeMinAsInt(std::map<String,String> Parameters);                      virtual optional<int>    RangeMinAsInt(std::map<String,String> Parameters);
91                      virtual optional<int>    RangeMaxAsInt(std::map<String,String> Parameters);                      virtual optional<int>    RangeMaxAsInt(std::map<String,String> Parameters);
92                      virtual std::vector<int> PossibilitiesAsInt(std::map<String,String> Parameters);                      virtual std::vector<int> PossibilitiesAsInt(std::map<String,String> Parameters);
93                        virtual int              ValueAsInt();
94                      virtual void             OnSetValue(int i) throw (Exception);                      virtual void             OnSetValue(int i) throw (Exception);
95                      static String Name();                      static String Name();
96              };              };
# Line 230  namespace LinuxSampler { Line 234  namespace LinuxSampler {
234              void AcquireChannels(uint Channels);              void AcquireChannels(uint Channels);
235    
236              /**              /**
237                 * Returns the amount of audio channels (including the so called
238                 * "mix channels") the device is currently providing.
239                 */
240                uint ChannelCount();
241    
242                /**
243               * Returns all device parameter settings.               * Returns all device parameter settings.
244               */               */
245              std::map<String,DeviceCreationParameter*> DeviceParameters();              std::map<String,DeviceCreationParameter*> DeviceParameters();
246    
247                /**
248                 * Add a chain of send effects to this AudioOutputDevice.
249                 * You actually have to add effects to that chain afterwards.
250                 */
251                EffectChain* AddSendEffectChain();
252    
253                /**
254                 * Remove the send effect chain given by @a iChain .
255                 *
256                 * @throws Exception - if given send effect chain doesn't exist
257                 */
258                void RemoveSendEffectChain(uint iChain) throw (Exception);
259    
260                /**
261                 * Returns send effect chain given by @a iChain or @c NULL if
262                 * there's no such effect chain.
263                 */
264                EffectChain* SendEffectChain(uint iChain) const;
265    
266                /**
267                 * Returns send effect chain with ID @a iChainID or @c NULL if
268                 * there's no such effect chain.
269                 */
270                EffectChain* SendEffectChainByID(uint iChainID) const;
271    
272                /**
273                 * Returns amount of send effect chains this AudioOutputDevice
274                 * currently provides.
275                 */
276                uint SendEffectChainCount() const;
277    
278                /**
279                 * @deprecated This method will be removed, use AddSendEffectChain() instead!
280                 */
281                EffectChain* AddMasterEffectChain() DEPRECATED_API;
282    
283                /**
284                 * @deprecated This method will be removed, use RemoveSendEffectChain() instead!
285                 */
286                void RemoveMasterEffectChain(uint iChain) throw (Exception) DEPRECATED_API;
287    
288                /**
289                 * @deprecated This method will be removed, use SendEffectChain() instead!
290                 */
291                EffectChain* MasterEffectChain(uint iChain) const DEPRECATED_API;
292    
293                /**
294                 * @deprecated This method will be removed, use SendEffectChainCount() instead!
295                 */
296                uint MasterEffectChainCount() const DEPRECATED_API;
297    
298          protected:          protected:
299              SynchronizedConfig<std::set<Engine*> >    Engines;     ///< All sampler engines that are connected to the audio output device.              SynchronizedConfig<std::set<Engine*> >    Engines;     ///< All sampler engines that are connected to the audio output device.
300              SynchronizedConfig<std::set<Engine*> >::Reader EnginesReader; ///< Audio thread access to Engines.              SynchronizedConfig<std::set<Engine*> >::Reader EnginesReader; ///< Audio thread access to Engines.
301              std::vector<AudioChannel*>                Channels;    ///< All audio channels of the audio output device. This is just a container; the descendant has to create channels by himself.              std::vector<AudioChannel*>                Channels;    ///< All audio channels of the audio output device. This is just a container; the descendant has to create channels by himself.
302              std::map<String,DeviceCreationParameter*> Parameters;  ///< All device parameters.              std::map<String,DeviceCreationParameter*> Parameters;  ///< All device parameters.
303                std::vector<EffectChain*>                 vEffectChains;
304                IDGenerator*                              EffectChainIDs;
305    
306              AudioOutputDevice(std::map<String,DeviceCreationParameter*> DriverParameters);              AudioOutputDevice(std::map<String,DeviceCreationParameter*> DriverParameters);
307    
# Line 269  namespace LinuxSampler { Line 332  namespace LinuxSampler {
332               */               */
333              int RenderSilence(uint Samples);              int RenderSilence(uint Samples);
334    
335              friend class Sampler; // allow Sampler class to destroy audio devices              friend class AudioOutputDeviceFactory; // allow AudioOutputDeviceFactory class to destroy audio devices
336    
337      };      };
338    

Legend:
Removed from v.890  
changed lines
  Added in v.2198

  ViewVC Help
Powered by ViewVC