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 |