--- linuxsampler/trunk/src/engines/AbstractEngineChannel.cpp 2021/08/04 18:06:34 3987 +++ linuxsampler/trunk/src/engines/AbstractEngineChannel.cpp 2021/08/04 18:23:05 3988 @@ -3,7 +3,7 @@ * LinuxSampler - modular, streaming capable sampler * * * * Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck * - * Copyright (C) 2005-2020 Christian Schoenebeck * + * Copyright (C) 2005-2021 Christian Schoenebeck * * Copyright (C) 2009-2012 Grigor Iliev * * Copyright (C) 2012-2017 Andreas Persson * * * @@ -593,6 +593,16 @@ event.pEngineChannel = this; if (this->pEventQueue->write_space() > 0) this->pEventQueue->push(&event); else dmsg(1,("AbstractEngineChannel: Input event queue full!")); + // inform connected virtual MIDI devices if any ... + // (e.g. slider / knob in instrument editor(s)) + ArrayList& devices = + const_cast&>( + virtualMidiDevicesReader_MidiThread.Lock() + ); + for (int i = 0; i < devices.size(); i++) { + devices[i]->SendCCToDevice(Controller, Value); + } + virtualMidiDevicesReader_MidiThread.Unlock(); } } @@ -624,6 +634,16 @@ event.pEngineChannel = this; if (this->pEventQueue->write_space() > 0) this->pEventQueue->push(&event); else dmsg(1,("AbstractEngineChannel: Input event queue full!")); + // inform connected virtual MIDI devices if any ... + // (e.g. slider / knob in instrument editor(s)) + ArrayList& devices = + const_cast&>( + virtualMidiDevicesReader_MidiThread.Lock() + ); + for (int i = 0; i < devices.size(); i++) { + devices[i]->SendCCToDevice(Controller, Value); + } + virtualMidiDevicesReader_MidiThread.Unlock(); } }