/[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 1934 by schoenebeck, Sun Jul 12 10:35:55 2009 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 - 2009 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    
47      /** Abstract base class for audio output drivers in LinuxSampler      /** Abstract base class for audio output drivers in LinuxSampler
48       *       *
# Line 87  namespace LinuxSampler { Line 89  namespace LinuxSampler {
89                      virtual optional<int>    RangeMinAsInt(std::map<String,String> Parameters);                      virtual optional<int>    RangeMinAsInt(std::map<String,String> Parameters);
90                      virtual optional<int>    RangeMaxAsInt(std::map<String,String> Parameters);                      virtual optional<int>    RangeMaxAsInt(std::map<String,String> Parameters);
91                      virtual std::vector<int> PossibilitiesAsInt(std::map<String,String> Parameters);                      virtual std::vector<int> PossibilitiesAsInt(std::map<String,String> Parameters);
92                        virtual int              ValueAsInt();
93                      virtual void             OnSetValue(int i) throw (Exception);                      virtual void             OnSetValue(int i) throw (Exception);
94                      static String Name();                      static String Name();
95              };              };
# Line 230  namespace LinuxSampler { Line 233  namespace LinuxSampler {
233              void AcquireChannels(uint Channels);              void AcquireChannels(uint Channels);
234    
235              /**              /**
236                 * Returns the amount of audio channels (including the so called
237                 * "mix channels") the device is currently providing.
238                 */
239                uint ChannelCount();
240    
241                /**
242               * Returns all device parameter settings.               * Returns all device parameter settings.
243               */               */
244              std::map<String,DeviceCreationParameter*> DeviceParameters();              std::map<String,DeviceCreationParameter*> DeviceParameters();
245    
246                /**
247                 * Add a chain of master effects to this AudioOutputDevice.
248                 * You actually have to add effects to that chain afterwards.
249                 */
250                EffectChain* AddMasterEffectChain();
251    
252                /**
253                 * Remove the master effect chain given by @a iChain .
254                 *
255                 * @throws Exception - if given master effect chain doesn't exist
256                 */
257                void RemoveMasterEffectChain(uint iChain) throw (Exception);
258    
259                /**
260                 * Returns master effect chain given by @a iChain or @c NULL if
261                 * there's no such effect chain.
262                 */
263                EffectChain* MasterEffectChain(uint iChain) const;
264    
265                /**
266                 * Returns amount of master effect chains this AudioOutputDevice
267                 * currently provides.
268                 */
269                uint MasterEffectChainCount() const;
270    
271          protected:          protected:
272              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.
273              SynchronizedConfig<std::set<Engine*> >::Reader EnginesReader; ///< Audio thread access to Engines.              SynchronizedConfig<std::set<Engine*> >::Reader EnginesReader; ///< Audio thread access to Engines.
274              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.
275              std::map<String,DeviceCreationParameter*> Parameters;  ///< All device parameters.              std::map<String,DeviceCreationParameter*> Parameters;  ///< All device parameters.
276                std::vector<EffectChain*>                 vEffectChains;
277    
278              AudioOutputDevice(std::map<String,DeviceCreationParameter*> DriverParameters);              AudioOutputDevice(std::map<String,DeviceCreationParameter*> DriverParameters);
279    
# Line 269  namespace LinuxSampler { Line 304  namespace LinuxSampler {
304               */               */
305              int RenderSilence(uint Samples);              int RenderSilence(uint Samples);
306    
307              friend class Sampler; // allow Sampler class to destroy audio devices              friend class AudioOutputDeviceFactory; // allow AudioOutputDeviceFactory class to destroy audio devices
308    
309      };      };
310    

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

  ViewVC Help
Powered by ViewVC