--- linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceFactory.cpp 2004/10/16 17:38:03 287 +++ linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceFactory.cpp 2004/10/19 00:36:34 288 @@ -22,11 +22,27 @@ #include "AudioOutputDeviceFactory.h" +// just to avoid linker problems +#include "AudioOutputDeviceAlsa.h" +#include "AudioOutputDeviceJack.h" + namespace LinuxSampler { std::map AudioOutputDeviceFactory::InnerFactories; std::map AudioOutputDeviceFactory::ParameterFactories; + // just a little hack to avoid linker problems + static int ___init___foo___() { + #if HAVE_ALSA + AudioOutputDeviceAlsa::Name().c_str(); + #endif // HAVE_ALSA + #if HAVE_JACK + AudioOutputDeviceJack::Name().c_str(); + #endif // HAVE_JACK + return 0; + } + static int ___foo___ = ___init___foo___(); + AudioOutputDevice* AudioOutputDeviceFactory::Create(String DriverName, std::map Parameters) throw (LinuxSamplerException) { if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no audio output driver '" + DriverName + "'."); //Let's see if we need to create parameters