resonance 1.0.1
Loading...
Searching...
No Matches
MusePlayer Class Referenceabstract

Something that turns one muse into messages over time. More...

#include <museplayer.h>

Inheritance diagram for MusePlayer:

Public Member Functions

void * operator new (size_t nSize)
 Allocate a player from the untagged heap.
void operator delete (void *pBlock)
 Release a player to the untagged heap.
 MusePlayer ()
 Construct a player with the next serial number.
virtual ~MusePlayer ()
 Inline.
virtual void Start (MsgSink *pSink)=0
 Begin playing, sending every message to one sink.
virtual void Stop ()=0
 Stop playing.
virtual int DisplacesSiblings ()=0
 Report whether this player displaces its siblings.

Detailed Description

Something that turns one muse into messages over time.

Its RTTI descriptor is at 0x0086f788. It has no base list. One data word sits ahead of the compiler-generated vptr. The vptr is therefore at +0x04, and the subobject is eight bytes. MultiMusePlayer places it at +0x30 and is the one implementation recovered; the 0x20-byte NotePlayer that MuseSynth creates for a NoteMsg is the other, and its constructor at 0x001b4328 takes seven arguments.

The class table at 0x007dfe68 runs five entries. Slots 2 through 4 point to the pure-virtual stub at 0x005381a8, so the class is never instantiated alone. The constructor and destructor install the table while a derived object is being built or torn down.

The three verbs come from MuseSynth, which is the one caller of all three. It calls Start() immediately after creating a player, Stop() on every player it releases, and DisplacesSiblings() on the player that requests exclusivity.

Constructor & Destructor Documentation

◆ MusePlayer()

MusePlayer::MusePlayer ( )

Construct a player with the next serial number.

Increments sMuseID and records the new value in mId.

Ghidra address:
NTSC-U/C: 0x001aa440
Ghidra address:
PAL: 0x001b01a8

◆ ~MusePlayer()

virtual MusePlayer::~MusePlayer ( )
inlinevirtual

Inline.

Identical copies sit at 0x001aa3e8 and 0x001aa4a8, one in each translation unit that emits the table at 0x007dfe68.

Ghidra address:
NTSC-U/C: 0x001aa3e8
Ghidra address:
PAL: 0x001b0150

Member Function Documentation

◆ operator new()

void * MusePlayer::operator new ( size_t nSize)

Allocate a player from the untagged heap.

No out-of-line body exists. The destructor's release branch inlines the call.

Parameters
nSizeThe object size the compiler supplies.
Returns
The block.

◆ operator delete()

void MusePlayer::operator delete ( void * pBlock)

Release a player to the untagged heap.

No out-of-line body exists.

Parameters
pBlockThe block.

◆ Start()

virtual void MusePlayer::Start ( MsgSink * pSink)
pure virtual

Begin playing, sending every message to one sink.

Table slot 2. MultiMusePlayer's override at 0x001a9b48 registers the sink, marks itself running, and posts a scheduler command over its muse's timed entries.

Parameters
pSinkThe sink every message goes to.

Implemented in MultiMusePlayer, and NotePlayer.

◆ Stop()

virtual void MusePlayer::Stop ( )
pure virtual

Stop playing.

Table slot 3. MultiMusePlayer's override at 0x001aa1b8 performs no work unless it is running, and otherwise releases its own players and withdraws its scheduler command.

Implemented in MultiMusePlayer, and NotePlayer.

◆ DisplacesSiblings()

virtual int MusePlayer::DisplacesSiblings ( )
pure virtual

Report whether this player displaces its siblings.

Table slot 4. MuseParent::RetainOnly() does not perform work unless this member reports non-zero. MultiMusePlayer's override at 0x001a9ed0 returns 1 and NotePlayer's at 0x001b41c0 returns zero.

Returns
Non-zero to displace the sibling players.

Implemented in MultiMusePlayer, and NotePlayer.


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