22 |
|
|
23 |
#include "MidiInputDeviceFactory.h" |
#include "MidiInputDeviceFactory.h" |
24 |
|
|
25 |
|
// just to avoid linker problems |
26 |
|
#include "MidiInputDeviceAlsa.h" |
27 |
|
|
28 |
namespace LinuxSampler { |
namespace LinuxSampler { |
29 |
|
|
30 |
std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories; |
std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories; |
31 |
std::map<String, DeviceParameterFactory*> MidiInputDeviceFactory::ParameterFactories; |
std::map<String, DeviceParameterFactory*> MidiInputDeviceFactory::ParameterFactories; |
32 |
|
|
33 |
|
// just a little hack to avoid linker problems |
34 |
|
static int ___init___foo___() { |
35 |
|
#if HAVE_ALSA |
36 |
|
MidiInputDeviceAlsa::Name().c_str(); |
37 |
|
#endif // HAVE_ALSA |
38 |
|
return 0; |
39 |
|
} |
40 |
|
static int ___foo___ = ___init___foo___(); |
41 |
|
|
42 |
MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) { |
MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) { |
43 |
if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no midi input driver '" + DriverName + "'."); |
if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no midi input driver '" + DriverName + "'."); |
44 |
//Let's see if we need to create parameters |
//Let's see if we need to create parameters |