175 |
pEngineChannel->Connect(pPort); |
pEngineChannel->Connect(pPort); |
176 |
} else { // no engine channel yet, remember it for future connection ... |
} else { // no engine channel yet, remember it for future connection ... |
177 |
const midi_conn_t c = { |
const midi_conn_t c = { |
178 |
pPort->GetDevice()->MidiInputDeviceID(), |
static_cast<uint>(pPort->GetDevice()->MidiInputDeviceID()), |
179 |
pPort->GetPortNumber() |
pPort->GetPortNumber() |
180 |
}; |
}; |
181 |
this->vMidiInputs.push_back(c); |
this->vMidiInputs.push_back(c); |
195 |
pEngineChannel->Disconnect(pPort); |
pEngineChannel->Disconnect(pPort); |
196 |
} else { // no engine channel yet, forget it regarding future connection ... |
} else { // no engine channel yet, forget it regarding future connection ... |
197 |
const midi_conn_t c = { |
const midi_conn_t c = { |
198 |
pPort->GetDevice()->MidiInputDeviceID(), |
static_cast<uint>(pPort->GetDevice()->MidiInputDeviceID()), |
199 |
pPort->GetPortNumber() |
pPort->GetPortNumber() |
200 |
}; |
}; |
201 |
for (int i = this->vMidiInputs.size() - 1; i >= 0; --i) { |
for (int i = this->vMidiInputs.size() - 1; i >= 0; --i) { |
270 |
this->vMidiInputs.clear(); |
this->vMidiInputs.clear(); |
271 |
// store the new connection (alone) |
// store the new connection (alone) |
272 |
const midi_conn_t c = { |
const midi_conn_t c = { |
273 |
pNewPort->GetDevice()->MidiInputDeviceID(), |
static_cast<uint>(pNewPort->GetDevice()->MidiInputDeviceID()), |
274 |
pNewPort->GetPortNumber() |
pNewPort->GetPortNumber() |
275 |
}; |
}; |
276 |
this->vMidiInputs.push_back(c); |
this->vMidiInputs.push_back(c); |