49 |
InstrumentStat = -1; |
InstrumentStat = -1; |
50 |
AudioDeviceChannelLeft = -1; |
AudioDeviceChannelLeft = -1; |
51 |
AudioDeviceChannelRight = -1; |
AudioDeviceChannelRight = -1; |
52 |
|
pMidiInputPort = NULL; |
53 |
|
midiChannel = midi_chan_all; |
54 |
ResetControllers(); |
ResetControllers(); |
55 |
} |
} |
56 |
|
|
342 |
} |
} |
343 |
} |
} |
344 |
|
|
345 |
|
void EngineChannel::Connect(MidiInputPort* pMidiPort, midi_chan_t MidiChannel) { |
346 |
|
if (!pMidiPort || pMidiPort == this->pMidiInputPort) return; |
347 |
|
DisconnectMidiInputPort(); |
348 |
|
this->pMidiInputPort = pMidiPort; |
349 |
|
this->midiChannel = MidiChannel; |
350 |
|
pMidiPort->Connect(this, MidiChannel); |
351 |
|
} |
352 |
|
|
353 |
|
void EngineChannel::DisconnectMidiInputPort() { |
354 |
|
MidiInputPort* pOldPort = this->pMidiInputPort; |
355 |
|
this->pMidiInputPort = NULL; |
356 |
|
if (pOldPort) pOldPort->Disconnect(this); |
357 |
|
} |
358 |
|
|
359 |
|
MidiInputPort* EngineChannel::GetMidiInputPort() { |
360 |
|
return pMidiInputPort; |
361 |
|
} |
362 |
|
|
363 |
|
midi_chan_t EngineChannel::MidiChannel() { |
364 |
|
return midiChannel; |
365 |
|
} |
366 |
|
|
367 |
/** |
/** |
368 |
* Will be called by the MIDIIn Thread to let the audio thread trigger a new |
* Will be called by the MIDIIn Thread to let the audio thread trigger a new |
369 |
* voice for the given key. |
* voice for the given key. |