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 - 2009 Christian Schoenebeck * |
* Copyright (C) 2005 - 2010 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This library is free software; you can redistribute it and/or modify * |
* This library 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 * |
88 |
|
|
89 |
// dereference midi input port. |
// dereference midi input port. |
90 |
MidiInputPort* pMidiInputPort = __GetMidiInputDevicePort(GetMidiInputPort()); |
MidiInputPort* pMidiInputPort = __GetMidiInputDevicePort(GetMidiInputPort()); |
91 |
|
midi_chan_t midiChannel = GetMidiInputChannel(); |
92 |
// disconnect old engine channel |
// disconnect old engine channel |
93 |
if (pEngineChannel) { |
if (pEngineChannel) { |
94 |
Engine* engine = pEngineChannel->GetEngine(); |
Engine* engine = pEngineChannel->GetEngine(); |
108 |
pNewEngineChannel->Connect(pAudioOutputDevice); |
pNewEngineChannel->Connect(pAudioOutputDevice); |
109 |
pAudioOutputDevice->Connect(pNewEngineChannel->GetEngine()); |
pAudioOutputDevice->Connect(pNewEngineChannel->GetEngine()); |
110 |
} |
} |
111 |
if (pMidiInputPort) pMidiInputPort->Connect(pNewEngineChannel, GetMidiInputChannel()); |
if (pMidiInputPort) pMidiInputPort->Connect(pNewEngineChannel, midiChannel); |
112 |
pEngineChannel = pNewEngineChannel; |
pEngineChannel = pNewEngineChannel; |
113 |
|
|
114 |
// from now on get MIDI device and port from EngineChannel object |
// from now on get MIDI device and port from EngineChannel object |