resonance 1.0.1
Loading...
Searching...
No Matches
MidiDisabler Class Reference

Filter that stops a track's notes while it is disabled and passes everything else. More...

#include <middisabler.h>

Inheritance diagram for MidiDisabler:
Collaboration diagram for MidiDisabler:

Public Member Functions

 MidiDisabler (int bEnabled)
virtual ~MidiDisabler ()
virtual void DispatchPriv (Message *pMsg)
 Forward the message unless it is a note the filter stops.
void Enable ()
 Start passing notes.
void Disable ()
 Stop passing notes, and silence the notes already sounding with an AllNotesOffMsg.
Public Member Functions inherited from MsgSource
virtual ~MsgSource ()
virtual void AddSink (MsgSink *pSink)
 Register a sink, ignoring a sink that is already registered.
virtual void RemoveSink (MsgSink *pSink)
 Unregister the first occurrence of a sink.
void Send (Message *pMsg) const
 Deliver a message to every registered sink, in registration order.
void ClearSinks ()
 Unregister every sink.
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the tagged heap under the tag "MsgSink".
void operator delete (void *pBlock)
 Release a sink to the tagged heap.
virtual ~MsgSink ()
virtual void Dispatch (Message *pMsg)
 Accept a message.

Additional Inherited Members

Public Attributes inherited from MsgSource
int mGraphBuilt
 A word no member of this class reads.

Detailed Description

Filter that stops a track's notes while it is disabled and passes everything else.

It has MsgSource at offset 0 and MsgSink at +0x14. Its tables are at 0x007df530 and 0x007df508, the second adjusting this by -20. The unit spans 0x001a6a58 through 0x001a6fb8. BGTrackGraph's constructor creates the one instance each background track has, with the constructor expanded inline.

While mEnabled is clear, DispatchPriv() drops every NoteMsg and every StdMidiMsg whose status is a note-off or a note-on, and forwards the rest.

The unreferenced forwarder at 0x001a6ed8 in this unit, byte-identical to MsgJoiner::DispatchPriv() at 0x00195b70, has its unwind record at 0x006852d8 as its only reference and is recorded here rather than declared.

Constructor & Destructor Documentation

◆ MidiDisabler()

MidiDisabler::MidiDisabler ( int bEnabled)
explicit
Parameters
bEnabledNon-zero to start passing notes.
Ghidra address:
NTSC-U/C: 0x001a6e10
Ghidra address:
PAL: 0x001acb78

◆ ~MidiDisabler()

virtual MidiDisabler::~MidiDisabler ( )
virtual
Ghidra address:
NTSC-U/C: 0x001a6ac0
Ghidra address:
PAL: 0x001ac828

Member Function Documentation

◆ DispatchPriv()

virtual void MidiDisabler::DispatchPriv ( Message * pMsg)
virtual

Forward the message unless it is a note the filter stops.

StdMidiMsg and NoteMsg go through their OnMsg() overloads, which are expanded inline here.

Parameters
pMsgThe message.
Ghidra address:
NTSC-U/C: 0x001a6f08
Ghidra address:
PAL: 0x001acc70

Implements MsgSink.

◆ Enable()

void MidiDisabler::Enable ( )

Start passing notes.

The title is inferred.

Ghidra address:
NTSC-U/C: 0x001a6ef8
Ghidra address:
PAL: 0x001acc60

◆ Disable()

void MidiDisabler::Disable ( )

Stop passing notes, and silence the notes already sounding with an AllNotesOffMsg.

The title is inferred.

Ghidra address:
NTSC-U/C: 0x001a6a58
Ghidra address:
PAL: 0x001ac7c0

The documentation for this class was generated from the following file: