|
resonance 1.0.1
|
Owner of the players that are sounding, and the sink that starts them. More...
#include <musesynth.h>


Public Member Functions | |
| MuseSynth (Sch::TickClock *pClock) | |
| virtual | ~MuseSynth () |
| Release every player and then the splitter. | |
| void | AddSink (MsgSink *pSink) |
| Register a sink with the splitter every player sends to. | |
| void | CreateSustainer () |
| Build the sustain filter this synthesiser feeds through. | |
| virtual void | RetainOnly (MusePlayer *pPlayer) |
| virtual void | PlayerFinished (MusePlayer *pPlayer) |
| int | IsActive () const |
| Report whether any player is sounding. | |
| void | ReleaseAllPlayers () |
| Stop and release every player. | |
| 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. | |
Protected Member Functions | |
| void | StartNotePlayer (Message *pMsg) |
| Start a note player for one NoteMsg. | |
| void | StartMultiMusePlayer (Message *pMsg) |
| Start a MultiMusePlayer for one MultiMuseMsg. | |
| virtual void | DispatchPriv (Message *pMsg) |
| Act on a message. | |
| void | OnAllNotesOff () |
| The out-of-line copy of the AllNotesOffMsg branch DispatchPriv() expands inline. | |
| void | OnStdMidi (StdMidiMsg *pMsg) |
| The out-of-line copy of the StdMidiMsg branch DispatchPriv() expands inline. | |
| void | OnSustainNote (SustainNoteMsg *pMsg) |
| The out-of-line copy of the SustainNoteMsg branch DispatchPriv() expands inline. | |
Protected Attributes | |
| Sch::TickClock * | mClock |
| MsgSplitter | mSplitter |
| SynthSustainer * | mSustainer |
| MsgSink * | mOutput |
| std::list< MusePlayer * > | mPlayers |
Owner of the players that are sounding, and the sink that starts them.
Its RTTI descriptor is at 0x00902290. It has MsgSink at offset 0 and MuseParent at offset 4. MultiMusePlayer's MusePlayer base at offset 48 confirms the object size of 0x30 bytes. Its primary table is at 0x007e0008 and its MuseParent table at 0x007dffe8.
It is a MsgSink that creates a player per message. A NoteMsg creates a 0x20-byte NotePlayer through the constructor at 0x001b4328, a MultiMuseMsg creates a MultiMusePlayer, and an AllNotesOffMsg releases every player. A StdMidiMsg or a SustainNoteMsg is instead forwarded straight to mOutput, so a message that needs no scheduling bypasses the player list. Every other message is discarded.
Every player it creates is started against mOutput, which addresses its own embedded MsgSplitter, or the sustainer CreateSustainer() places in front of it. AddSink() registers a sink with that splitter, so a caller that wants the sound registers once here rather than with each player.
The name comes from the RTTI descriptor.
| MuseSynth::MuseSynth | ( | Sch::TickClock * | pClock | ) |
| pClock | The clock every player it creates is scheduled against. |
|
virtual |
Release every player and then the splitter.
| void MuseSynth::AddSink | ( | MsgSink * | pSink | ) |
Register a sink with the splitter every player sends to.
| pSink | The sink to register. |
| void MuseSynth::CreateSustainer | ( | ) |
Build the sustain filter this synthesiser feeds through.
The routine allocates a SynthSustainer under the tag MsgSink, stores it at both +0x24 and +0x28, and points its downstream sink at this object's +0x0c. AxingSTG is the only caller. The title is inferred from that body.
|
virtual |
Implements MuseParent.
Reimplemented in MultiMusePlayer.
|
virtual |
Implements MuseParent.
Reimplemented in MultiMusePlayer.
| int MuseSynth::IsActive | ( | ) | const |
Report whether any player is sounding.
The body counts the nodes of mPlayers. The image has no caller.
| void MuseSynth::ReleaseAllPlayers | ( | ) |
Stop and release every player.
|
protected |
Start a note player for one NoteMsg.
Creates a 0x20-byte NotePlayer from the message's three payload bytes and its word at +0x0c, stores it, and starts it against mOutput.
| pMsg | The NoteMsg. |
|
protected |
Start a MultiMusePlayer for one MultiMuseMsg.
Creates a 0x50-byte MultiMusePlayer over the message's sequence, stores its MusePlayer subobject, and starts it against mOutput. A null player is stored as a null pointer rather than as the fixed subobject displacement, which is the compiler's own null check on the base-class conversion.
| pMsg | The MultiMuseMsg. |
|
protectedvirtual |
Act on a message.
Primary table slot 3. MultiMusePlayer retains this body unchanged.
| pMsg | The message. |
Implements MsgSink.
|
protected |
The out-of-line copy of the AllNotesOffMsg branch DispatchPriv() expands inline.
The message is not read.
|
protected |
The out-of-line copy of the StdMidiMsg branch DispatchPriv() expands inline.
|
protected |
The out-of-line copy of the SustainNoteMsg branch DispatchPriv() expands inline.
Its body compiles to the same bytes as OnStdMidi().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |