/[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 840 by persson, Sun Feb 26 13:00:08 2006 UTC revision 1001 by schoenebeck, Wed Dec 27 16:17:08 2006 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 Christian Schoenebeck                              *   *   Copyright (C) 2005, 2006 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 30  Line 30 
30  #include <stdexcept>  #include <stdexcept>
31    
32  #include "../../common/global.h"  #include "../../common/global.h"
33  #include "../../common/LinuxSamplerException.h"  #include "../../common/Exception.h"
34  #include "../Device.h"  #include "../Device.h"
35  #include "../DeviceParameter.h"  #include "../DeviceParameter.h"
36  #include "../../engines/common/Engine.h"  #include "../../engines/Engine.h"
37  #include "AudioChannel.h"  #include "AudioChannel.h"
38  #include "../../common/SynchronizedConfig.h"  #include "../../common/SynchronizedConfig.h"
39    
# Line 67  namespace LinuxSampler { Line 67  namespace LinuxSampler {
67                      virtual bool   Mandatory();                      virtual bool   Mandatory();
68                      virtual std::map<String,DeviceCreationParameter*> DependsAsParameters();                      virtual std::map<String,DeviceCreationParameter*> DependsAsParameters();
69                      virtual optional<bool> DefaultAsBool(std::map<String,String> Parameters);                      virtual optional<bool> DefaultAsBool(std::map<String,String> Parameters);
70                      virtual void OnSetValue(bool b) throw (LinuxSamplerException);                      virtual void OnSetValue(bool b) throw (Exception);
71                      static String Name();                      static String Name();
72              };              };
73    
# Line 87  namespace LinuxSampler { Line 87  namespace LinuxSampler {
87                      virtual optional<int>    RangeMinAsInt(std::map<String,String> Parameters);                      virtual optional<int>    RangeMinAsInt(std::map<String,String> Parameters);
88                      virtual optional<int>    RangeMaxAsInt(std::map<String,String> Parameters);                      virtual optional<int>    RangeMaxAsInt(std::map<String,String> Parameters);
89                      virtual std::vector<int> PossibilitiesAsInt(std::map<String,String> Parameters);                      virtual std::vector<int> PossibilitiesAsInt(std::map<String,String> Parameters);
90                      virtual void             OnSetValue(int i) throw (LinuxSamplerException);                      virtual void             OnSetValue(int i) throw (Exception);
91                      static String Name();                      static String Name();
92              };              };
93    
# Line 108  namespace LinuxSampler { Line 108  namespace LinuxSampler {
108                      virtual optional<int>    RangeMinAsInt(std::map<String,String> Parameters);                      virtual optional<int>    RangeMinAsInt(std::map<String,String> Parameters);
109                      virtual optional<int>    RangeMaxAsInt(std::map<String,String> Parameters);                      virtual optional<int>    RangeMaxAsInt(std::map<String,String> Parameters);
110                      virtual std::vector<int> PossibilitiesAsInt(std::map<String,String> Parameters);                      virtual std::vector<int> PossibilitiesAsInt(std::map<String,String> Parameters);
111                      virtual void             OnSetValue(int i) throw (LinuxSamplerException);                      virtual void             OnSetValue(int i) throw (Exception);
112                      static String Name();                      static String Name();
113              };              };
114    
# Line 230  namespace LinuxSampler { Line 230  namespace LinuxSampler {
230              void AcquireChannels(uint Channels);              void AcquireChannels(uint Channels);
231    
232              /**              /**
233                 * Returns the amount of audio channels (including the so called
234                 * "mix channels") the device is currently providing.
235                 */
236                uint ChannelCount();
237    
238                /**
239               * Returns all device parameter settings.               * Returns all device parameter settings.
240               */               */
241              std::map<String,DeviceCreationParameter*> DeviceParameters();              std::map<String,DeviceCreationParameter*> DeviceParameters();
242    
243          protected:          protected:
244              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.
245                SynchronizedConfig<std::set<Engine*> >::Reader EnginesReader; ///< Audio thread access to Engines.
246              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.
247              std::map<String,DeviceCreationParameter*> Parameters;  ///< All device parameters.              std::map<String,DeviceCreationParameter*> Parameters;  ///< All device parameters.
248    
# Line 278  namespace LinuxSampler { Line 285  namespace LinuxSampler {
285       * (which should be done in the constructor of the AudioOutputDevice       * (which should be done in the constructor of the AudioOutputDevice
286       * descendant).       * descendant).
287       */       */
288      class AudioOutputException : public LinuxSamplerException {      class AudioOutputException : public Exception {
289          public:          public:
290              AudioOutputException(const std::string& msg) : LinuxSamplerException(msg) {}              AudioOutputException(const std::string& msg) : Exception(msg) {}
291      };      };
292  }  }
293    

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

  ViewVC Help
Powered by ViewVC