/[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 287 by schoenebeck, Tue Jul 13 22:04:16 2004 UTC revision 288 by schoenebeck, Tue Oct 19 00:36:34 2004 UTC
# Line 22  Line 22 
22    
23  #include "AudioOutputDeviceFactory.h"  #include "AudioOutputDeviceFactory.h"
24    
25    // just to avoid linker problems
26    #include "AudioOutputDeviceAlsa.h"
27    #include "AudioOutputDeviceJack.h"
28    
29  namespace LinuxSampler {  namespace LinuxSampler {
30    
31      std::map<String, AudioOutputDeviceFactory::InnerFactory*> AudioOutputDeviceFactory::InnerFactories;      std::map<String, AudioOutputDeviceFactory::InnerFactory*> AudioOutputDeviceFactory::InnerFactories;
32      std::map<String, DeviceParameterFactory*> AudioOutputDeviceFactory::ParameterFactories;      std::map<String, DeviceParameterFactory*> AudioOutputDeviceFactory::ParameterFactories;
33    
34        // just a little hack to avoid linker problems
35        static int ___init___foo___() {
36            #if HAVE_ALSA
37            AudioOutputDeviceAlsa::Name().c_str();
38            #endif // HAVE_ALSA
39            #if HAVE_JACK
40            AudioOutputDeviceJack::Name().c_str();
41            #endif // HAVE_JACK
42            return 0;
43        }
44        static int ___foo___ = ___init___foo___();
45    
46      AudioOutputDevice* AudioOutputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) {      AudioOutputDevice* AudioOutputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) {
47          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 + "'.");
48          //Let's see if we need to create parameters          //Let's see if we need to create parameters

Legend:
Removed from v.287  
changed lines
  Added in v.288

  ViewVC Help
Powered by ViewVC