resonance 1.0.1
Loading...
Searching...
No Matches
middisabler.h
Go to the documentation of this file.
1#pragma once
2
3#include "app/msgsink.h"
4#include "app/msgsource.h"
5
6class Message;
7class NoteMsg;
8class StdMidiMsg;
9
25class MidiDisabler : public MsgSource, public MsgSink {
26public:
32 explicit MidiDisabler(int bEnabled);
33
38 virtual ~MidiDisabler();
39
49 virtual void DispatchPriv(Message *pMsg);
50
59 void Enable();
60
69 void Disable();
70
71private:
78 void OnMsg(StdMidiMsg &msg);
79
86 void OnMsg(NoteMsg &msg);
87
88 int mEnabled; // +0x18
89};
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
MidiDisabler(int bEnabled)
void Enable()
Start passing notes.
void Disable()
Stop passing notes, and silence the notes already sounding with an AllNotesOffMsg.
virtual void DispatchPriv(Message *pMsg)
Forward the message unless it is a note the filter stops.
virtual ~MidiDisabler()
Receiver of engine messages.
Definition msgsink.h:37
Sender of engine messages, which stores the list of sinks that receive them.
Definition msgsource.h:26
Event the game passes between a MsgSource and a MsgSink.
Definition notemsg.h:28
Event the game passes between a MsgSource and a MsgSink.
Definition stdmidimsg.h:27