--- linuxsampler/trunk/src/drivers/midi/MidiInputPort.h 2008/02/15 17:19:21 1694 +++ linuxsampler/trunk/src/drivers/midi/MidiInputPort.h 2008/02/16 01:09:33 1695 @@ -3,7 +3,7 @@ * LinuxSampler - modular, streaming capable sampler * * * * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * - * Copyright (C) 2005 - 2007 Christian Schoenebeck * + * Copyright (C) 2005 - 2008 Christian Schoenebeck * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -38,6 +38,7 @@ // just symbol prototyping class MidiInputDevice; class EngineChannel; + class VirtualMidiDevice; class MidiInputPort { public: @@ -120,6 +121,19 @@ */ static bool RemoveSysexListener(Engine* engine); + /** + * Connects the given virtual MIDI device to this MIDI input + * device. This can be used to listen to MIDI data arriving on + * the MIDI input device's MIDI ports, e.g. to show an MIDI + * activity indicator somewhere. + */ + void Connect(VirtualMidiDevice* pDevice); + + /** + * Disconnect the previously connected virtual MIDI device. + */ + void Disconnect(VirtualMidiDevice* pDevice); + ///////////////////////////////////////////////////////////////// // dispatch methods @@ -307,6 +321,9 @@ SynchronizedConfig::Reader MidiChannelMapReader; ///< MIDI thread access to MidiChannelMap Mutex MidiChannelMapMutex; ///< Used to protect the MidiChannelMap from being used at the same time by different threads. SynchronizedConfig >::Reader SysexListenersReader; ///< MIDI thread access to SysexListeners + SynchronizedConfig > virtualMidiDevices; + SynchronizedConfig >::Reader virtualMidiDevicesReader; + Mutex virtualMidiDevicesMutex; /** * Constructor