26 |
# include "MidiInputDeviceAlsa.h" |
# include "MidiInputDeviceAlsa.h" |
27 |
#endif // HAVE_ALSA |
#endif // HAVE_ALSA |
28 |
|
|
29 |
|
#if HAVE_CORE_MIDI |
30 |
|
# include "MidiInputDeviceCoreMidi.h" |
31 |
|
#endif // HAVE_CORE_MIDI |
32 |
|
|
33 |
|
#if HAVE_MIDISHARE |
34 |
|
# include "MidiInputDeviceMidiShare.h" |
35 |
|
#endif // HAVE_MIDISHARE |
36 |
|
|
37 |
namespace LinuxSampler { |
namespace LinuxSampler { |
38 |
|
|
39 |
std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories; |
std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories; |
46 |
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceAlsa, ParameterPorts); |
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceAlsa, ParameterPorts); |
47 |
#endif // HAVE_ALSA |
#endif // HAVE_ALSA |
48 |
|
|
49 |
|
#if HAVE_CORE_MIDI |
50 |
|
REGISTER_MIDI_INPUT_DRIVER(MidiInputDeviceCoreMidi); |
51 |
|
/* Common parameters */ |
52 |
|
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceCoreMidi, ParameterActive); |
53 |
|
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceCoreMidi, ParameterPorts); |
54 |
|
#endif // HAVE_CORE_MIDI |
55 |
|
|
56 |
|
#if HAVE_MIDISHARE |
57 |
|
REGISTER_MIDI_INPUT_DRIVER(MidiInputDeviceMidiShare); |
58 |
|
/* Common parameters */ |
59 |
|
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceMidiShare, ParameterActive); |
60 |
|
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceMidiShare, ParameterPorts); |
61 |
|
#endif // HAVE_MIDISHARE |
62 |
|
|
63 |
MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) { |
MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) { |
64 |
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 + "'."); |
65 |
//Let's see if we need to create parameters |
//Let's see if we need to create parameters |