--- linuxsampler/trunk/src/drivers/midi/MidiInputPort.h 2006/02/26 13:00:08 840 +++ linuxsampler/trunk/src/drivers/midi/MidiInputPort.h 2006/03/19 16:38:22 846 @@ -105,8 +105,19 @@ */ std::map PortParameters(); + /** + * Registers that an engine wants to have sysex messages. + */ + static void AddSysexListener(Engine* engine); - + /** + * Removes engine from list of engines getting sysex + * messages. + * + * @returns true if engine was removed, false if it wasn't + * present in the list. + */ + static bool RemoveSysexListener(Engine* engine); ///////////////////////////////////////////////////////////////// @@ -202,7 +213,9 @@ std::map Parameters; ///< All port parameters. typedef std::set MidiChannelMap_t[17]; SynchronizedConfig MidiChannelMap; ///< Contains the list of connected engines for each MIDI channel, where index 0 points to the list of engines which are connected to all MIDI channels. Usually it's not necessary for the descendant to use this map, instead it should just use the Dispatch* methods. + 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 /** * Constructor @@ -218,6 +231,7 @@ private: EngineChannel* pPreviousProgramChangeEngineChannel; ///< Points to the engine channel which was connected by the previous DispatchProgramChange() call. + static SynchronizedConfig > SysexListeners; ///< All engines that are listening to sysex messages. }; } // namsepace LinuxSampler