3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
40 |
#if HAVE_MME_MIDI |
#if HAVE_MME_MIDI |
41 |
# include "MidiInputDeviceMme.h" |
# include "MidiInputDeviceMme.h" |
42 |
#endif // HAVE_MME_MIDI |
#endif // HAVE_MME_MIDI |
43 |
|
|
44 |
|
#if HAVE_JACK_MIDI |
45 |
|
# include "MidiInputDeviceJack.h" |
46 |
|
#endif // HAVE_JACK_MIDI |
47 |
|
|
48 |
namespace LinuxSampler { |
namespace LinuxSampler { |
49 |
|
|
50 |
std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories; |
std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories; |
78 |
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceMme, ParameterPorts); |
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceMme, ParameterPorts); |
79 |
#endif // HAVE_MME_MIDI |
#endif // HAVE_MME_MIDI |
80 |
|
|
81 |
|
#if HAVE_JACK_MIDI |
82 |
|
REGISTER_MIDI_INPUT_DRIVER(MidiInputDeviceJack); |
83 |
|
/* Common parameters */ |
84 |
|
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceJack, ParameterActive); |
85 |
|
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceJack, ParameterPorts); |
86 |
|
/* Driver specific parameters */ |
87 |
|
REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceJack, ParameterName); |
88 |
|
#endif // HAVE_JACK_MIDI |
89 |
|
|
90 |
MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters, Sampler* pSampler) throw (Exception) { |
MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters, Sampler* pSampler) throw (Exception) { |
91 |
if (!InnerFactories.count(DriverName)) throw Exception("There is no midi input driver '" + DriverName + "'."); |
if (!InnerFactories.count(DriverName)) throw Exception("There is no midi input driver '" + DriverName + "'."); |
92 |
//Let's see if we need to create parameters |
//Let's see if we need to create parameters |