/[svn]/linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceFactory.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceFactory.cpp

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

revision 200 by schoenebeck, Tue Jul 13 22:04:16 2004 UTC revision 289 by schoenebeck, Tue Oct 19 14:41:38 2004 UTC
# Line 22  Line 22 
22    
23  #include "AudioOutputDeviceFactory.h"  #include "AudioOutputDeviceFactory.h"
24    
25    #if HAVE_ALSA
26    # include "AudioOutputDeviceAlsa.h"
27    #endif // HAVE_ALSA
28    
29    #if HAVE_JACK
30    # include "AudioOutputDeviceJack.h"
31    #endif // HAVE_JACK
32    
33  namespace LinuxSampler {  namespace LinuxSampler {
34    
35      std::map<String, AudioOutputDeviceFactory::InnerFactory*> AudioOutputDeviceFactory::InnerFactories;      std::map<String, AudioOutputDeviceFactory::InnerFactory*> AudioOutputDeviceFactory::InnerFactories;
36      std::map<String, DeviceParameterFactory*> AudioOutputDeviceFactory::ParameterFactories;      std::map<String, DeviceParameterFactory*> AudioOutputDeviceFactory::ParameterFactories;
37    
38    #if HAVE_ALSA
39        REGISTER_AUDIO_OUTPUT_DRIVER(AudioOutputDeviceAlsa);
40        /* Common parameters for now they'll have to be registered here. */
41        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceAlsa, ParameterActive);
42        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceAlsa, ParameterSampleRate);
43        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceAlsa, ParameterChannels);
44        /* Driver specific parameters */
45        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceAlsa, ParameterCard);
46        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceAlsa, ParameterFragments);
47        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceAlsa, ParameterFragmentSize);
48    #endif // HAVE_ALSA
49    
50    #if HAVE_JACK
51        REGISTER_AUDIO_OUTPUT_DRIVER(AudioOutputDeviceJack);
52        /* Common parameters for now they'll have to be registered here. */
53        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceJack, ParameterActive);
54        REGISTER_AUDIO_OUTPUT_DRIVER_PARAMETER(AudioOutputDeviceJack, ParameterChannels);
55    #endif // HAVE_JACK
56    
57      AudioOutputDevice* AudioOutputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) {      AudioOutputDevice* AudioOutputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) {
58          if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");          if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'.");
59          //Let's see if we need to create parameters          //Let's see if we need to create parameters

Legend:
Removed from v.200  
changed lines
  Added in v.289

  ViewVC Help
Powered by ViewVC