36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
// *************** ParameterPorts *************** |
40 |
|
// * |
41 |
|
|
42 |
|
// *************** ParameterPorts *************** |
43 |
|
// * |
44 |
|
|
45 |
|
MidiInputDeviceMme::ParameterPorts::ParameterPorts() : DeviceCreationParameterInt() { |
46 |
|
InitWithDefault(); |
47 |
|
} |
48 |
|
|
49 |
|
MidiInputDeviceMme::ParameterPorts::ParameterPorts(String val) : DeviceCreationParameterInt(val) { |
50 |
|
} |
51 |
|
|
52 |
|
String MidiInputDeviceMme::ParameterPorts::Description() { |
53 |
|
return "Number of ports"; |
54 |
|
} |
55 |
|
|
56 |
|
bool MidiInputDeviceMme::ParameterPorts::Fix() { |
57 |
|
return true; |
58 |
|
} |
59 |
|
|
60 |
|
bool MidiInputDeviceMme::ParameterPorts::Mandatory() { |
61 |
|
return false; |
62 |
|
} |
63 |
|
|
64 |
|
std::map<String,DeviceCreationParameter*> MidiInputDeviceMme::ParameterPorts::DependsAsParameters() { |
65 |
|
return std::map<String,DeviceCreationParameter*>(); |
66 |
|
} |
67 |
|
|
68 |
|
// the MME driver supports only one port so to manage multiple MME MIDI ports the user just creates several MME drivers and connects each one to the desired MME port |
69 |
|
optional<int> MidiInputDeviceMme::ParameterPorts::DefaultAsInt(std::map<String,String> Parameters) { |
70 |
|
return 1; |
71 |
|
} |
72 |
|
|
73 |
|
optional<int> MidiInputDeviceMme::ParameterPorts::RangeMinAsInt(std::map<String,String> Parameters) { |
74 |
|
return 1; |
75 |
|
} |
76 |
|
|
77 |
|
optional<int> MidiInputDeviceMme::ParameterPorts::RangeMaxAsInt(std::map<String,String> Parameters) { |
78 |
|
return 1; |
79 |
|
} |
80 |
|
|
81 |
|
std::vector<int> MidiInputDeviceMme::ParameterPorts::PossibilitiesAsInt(std::map<String,String> Parameters) { |
82 |
|
return std::vector<int>(); |
83 |
|
} |
84 |
|
|
85 |
|
void MidiInputDeviceMme::ParameterPorts::OnSetValue(int i) throw (Exception) { |
86 |
|
if (i != 1) throw Exception("MME only supports one MIDI port per device"); |
87 |
|
} |
88 |
|
|
89 |
|
String MidiInputDeviceMme::ParameterPorts::Name() { |
90 |
|
return "PORTS"; |
91 |
|
} |
92 |
|
|
93 |
|
// the MME driver supports only one port so to manage multiple MME MIDI ports the user just creates several MME drivers and connects each one to the desired MME port |
94 |
|
|
95 |
|
|
96 |
|
|
97 |
// *************** ParameterPort *************** |
// *************** ParameterPort *************** |
98 |
// * |
// * |
351 |
} |
} |
352 |
|
|
353 |
MidiInputDeviceMme::MidiInputPortMme* MidiInputDeviceMme::CreateMidiPort() { |
MidiInputDeviceMme::MidiInputPortMme* MidiInputDeviceMme::CreateMidiPort() { |
|
dmsg(1,("foo\n")); |
|
354 |
return new MidiInputPortMme(this); |
return new MidiInputPortMme(this); |
355 |
} |
} |
356 |
|
|
375 |
} |
} |
376 |
|
|
377 |
String MidiInputDeviceMme::Version() { |
String MidiInputDeviceMme::Version() { |
378 |
String s = "$Revision: 1.1 $"; |
String s = "$Revision: 1.2 $"; |
379 |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
380 |
} |
} |
381 |
|
|