130 |
if (alsaPort < 0) throw MidiInputException("Error creating sequencer port"); |
if (alsaPort < 0) throw MidiInputException("Error creating sequencer port"); |
131 |
this->portNumber = alsaPort; |
this->portNumber = alsaPort; |
132 |
|
|
133 |
|
delete Parameters["NAME"]; |
134 |
Parameters["NAME"] = new ParameterName(this); |
Parameters["NAME"] = new ParameterName(this); |
135 |
Parameters["ALSA_SEQ_BINDINGS"] = new ParameterAlsaSeqBindings(this); |
Parameters["ALSA_SEQ_BINDINGS"] = new ParameterAlsaSeqBindings(this); |
136 |
Parameters["ALSA_SEQ_ID"] = new ParameterAlsaSeqId(this); |
Parameters["ALSA_SEQ_ID"] = new ParameterAlsaSeqId(this); |
185 |
} |
} |
186 |
|
|
187 |
MidiInputDeviceAlsa::~MidiInputDeviceAlsa() { |
MidiInputDeviceAlsa::~MidiInputDeviceAlsa() { |
188 |
snd_seq_close(hAlsaSeq); |
// free the midi ports (we can't let the base class do this, |
189 |
|
// as the MidiInputPortAlsa destructors need access to |
190 |
|
// hAlsaSeq) |
191 |
|
for (std::map<int,MidiInputPort*>::iterator iter = Ports.begin(); iter != Ports.end() ; iter++) { |
192 |
|
delete static_cast<MidiInputPortAlsa*>(iter->second); |
193 |
|
} |
194 |
|
Ports.clear(); |
195 |
|
|
196 |
|
snd_seq_close(hAlsaSeq); |
197 |
} |
} |
198 |
|
|
199 |
MidiInputDeviceAlsa::MidiInputPortAlsa* MidiInputDeviceAlsa::CreateMidiPort() { |
MidiInputDeviceAlsa::MidiInputPortAlsa* MidiInputDeviceAlsa::CreateMidiPort() { |
221 |
} |
} |
222 |
|
|
223 |
String MidiInputDeviceAlsa::Version() { |
String MidiInputDeviceAlsa::Version() { |
224 |
String s = "$Revision: 1.18 $"; |
String s = "$Revision: 1.19 $"; |
225 |
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 |
226 |
} |
} |
227 |
|
|