22#ifndef __LS_EVENTLISTENERS_H__
23#define __LS_EVENTLISTENERS_H__
32 class MidiInputDevice;
42 vListenerList.push_back(
l);
49 typename std::vector<L>::iterator
it;
50 it = vListenerList.begin();
51 for (;
it != vListenerList.end();
it++) {
53 vListenerList.erase(
it);
63 vListenerList.clear();
70 return (
int) vListenerList.size();
78 return vListenerList.at(
index);
82 std::vector<L> vListenerList;
85#define REGISTER_FIRE_EVENT_METHOD(method) virtual void method() \
86 { for(int i = 0; i < GetListenerCount(); i++) GetListener(i)->method(); }
88#define REGISTER_FIRE_EVENT_METHOD_ARG1(method, T1) virtual void method(T1 _evt_arg1_) \
89 { for(int i = 0; i < GetListenerCount(); i++) GetListener(i)->method(_evt_arg1_); }
91#define REGISTER_FIRE_EVENT_METHOD_ARG2(method, T1, T2) virtual void method(T1 _evt_arg1_, T2 _evt_arg2_) \
92 { for(int i = 0; i < GetListenerCount(); i++) GetListener(i)->method(_evt_arg1_, _evt_arg2_); }
This class is used as a listener, which is notified when the number of audio output devices is change...
virtual void AudioDeviceCountChanged(int NewCount)=0
Invoked when the number of audio output devices has changed.
This class is used as a listener, which is notified when the fill state of the disk stream buffers on...
virtual void BufferFillChanged(int ChannelId, String FillData)=0
Invoked when the fill state of the disk stream buffers on the specified sampler channel is changed.
This class exists as convenience for creating listener objects.
virtual void ChannelToBeRemoved(SamplerChannel *pChannel)
virtual void ChannelCountChanged(int NewCount)
Invoked when the number of sampler channels has changed.
virtual void ChannelAdded(SamplerChannel *pChannel)
This class is used as a listener, which is notified when the number of sampler channels is changed.
virtual void ChannelCountChanged(int NewCount)=0
Invoked when the number of sampler channels has changed.
virtual void ChannelAdded(SamplerChannel *pChannel)=0
virtual void ChannelToBeRemoved(SamplerChannel *pChannel)=0
This class is used as a listener, which is notified when the engine type of a particular sampler chan...
virtual void EngineToBeChanged(int ChannelId)=0
Invoked when the engine type of the specified sampler channel is going to be changed soon.
virtual void EngineChanged(int ChannelId)=0
Invoked when the engine type of the specified sampler channel was changed.
This class is used as a listener, which is notified when the number of effect sends on a particular s...
virtual void FxSendCountChanged(int ChannelId, int NewCount)=0
Invoked when the number of effect sends on the specified sampler channel has changed.
void RemoveAllListeners()
Removes all listeners.
int GetListenerCount()
Gets the number of the registered listeners.
void RemoveListener(L l)
Removes the specified listener.
L GetListener(int index)
Gets the listener at the specified position.
void AddListener(L l)
Registers the specified listener for receiving event messages.
This class is used as a listener, which is notified when the number of MIDI input devices is changed.
virtual void MidiDeviceCreated(MidiInputDevice *pDevice)=0
Invoked to inform that a new MidiInputDevice has just been created.
virtual void MidiDeviceToBeDestroyed(MidiInputDevice *pDevice)=0
Invoked right before the supplied MIDI input device is going to be destroyed.
virtual void MidiDeviceCountChanged(int NewCount)=0
Invoked when the number of MIDI input devices has changed.
This class is used as a listener, which is notified when the number of MIDI instruments on a particul...
virtual void MidiInstrumentCountChanged(int MapId, int NewCount)=0
Invoked when the number of MIDI instruments has changed.
This class is used as a listener, which is notified when a MIDI instrument in a MIDI instrument map i...
virtual void MidiInstrumentInfoChanged(int MapId, int Bank, int Program)=0
Invoked when a MIDI instrument in a MIDI instrument map is changed.
This class is used as a listener, which is notified when the number of MIDI instrument maps is change...
virtual void MidiInstrumentMapCountChanged(int NewCount)=0
Invoked when the number of MIDI instrument maps has changed.
This class is used as a listener, which is notified when the settings of a MIDI instrument map are ch...
virtual void MidiInstrumentMapInfoChanged(int MapId)=0
Invoked when the settings of a MIDI instrument map are changed.
This class is used as a listener, which is notified when the number of MIDI input ports is changed.
virtual void MidiPortCountChanged(int NewCount)=0
Invoked when the number of MIDI input ports has changed.
virtual void MidiPortAdded(MidiInputPort *pPort)=0
Invoked to inform that a new MidiInputPort has just been added.
virtual void MidiPortToBeRemoved(MidiInputPort *pPort)=0
Invoked right before the supplied MIDI input port is going to be destroyed.
LinuxSampler sampler channel (a.k.a.
This class is used as a listener, which is notified when the number of active disk streams in a parti...
virtual void StreamCountChanged(int ChannelId, int NewCount)=0
Invoked when the number of active disk streams on the specified sampler channel has changed.
Wraps as a kind of pointer class some data object shared with other threads, to protect / synchronize...
This class is used as a listener, which is notified when the total number of active streams is change...
virtual void TotalStreamCountChanged(int NewCount)=0
Invoked when the total number of active streams is changed.
This class is used as a listener, which is notified when the total number of active voices is changed...
virtual void TotalVoiceCountChanged(int NewCount)=0
Invoked when the total number of active voices is changed.
This class is used as a listener, which is notified when the number of active voices in a particular ...
virtual void VoiceCountChanged(int ChannelId, int NewCount)=0
Invoked when the number of active voices on the specified sampler channel has changed.