--- linuxsampler/trunk/src/Sampler.cpp 2010/09/14 19:46:36 2122 +++ linuxsampler/trunk/src/Sampler.cpp 2010/09/15 10:04:07 2123 @@ -3,7 +3,7 @@ * LinuxSampler - modular, streaming capable sampler * * * * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * - * Copyright (C) 2005 - 2009 Christian Schoenebeck * + * Copyright (C) 2005 - 2010 Christian Schoenebeck * * * * This library is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -88,6 +88,7 @@ // dereference midi input port. MidiInputPort* pMidiInputPort = __GetMidiInputDevicePort(GetMidiInputPort()); + midi_chan_t midiChannel = GetMidiInputChannel(); // disconnect old engine channel if (pEngineChannel) { Engine* engine = pEngineChannel->GetEngine(); @@ -107,7 +108,7 @@ pNewEngineChannel->Connect(pAudioOutputDevice); pAudioOutputDevice->Connect(pNewEngineChannel->GetEngine()); } - if (pMidiInputPort) pMidiInputPort->Connect(pNewEngineChannel, GetMidiInputChannel()); + if (pMidiInputPort) pMidiInputPort->Connect(pNewEngineChannel, midiChannel); pEngineChannel = pNewEngineChannel; // from now on get MIDI device and port from EngineChannel object