|
resonance 1.0.1
|
Producer of the automatic riff a guitar track plays when it is not being played. More...
#include <autoriffer.h>


Public Member Functions | |
| AutoRiffer (Sch::TickClock *pClock, Quantizer *pQuantizer, const TrackData *pTrackData) | |
| virtual | ~AutoRiffer () |
| virtual void | DispatchPriv (Message *pMsg) |
| Act on a message. | |
| void | OnCommand (int nTick) |
| Repeat the current riff at a song position, or release the buttons. | |
| void | AddSink (MsgSink *pSink) |
| Add a sink to mSource. | |
| 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. | |
Public Attributes | |
| MuseSynth * | mSynth |
| Synthesiser AxingSTG installs while it wires the stage up. | |
| MsgSource | mSource |
| Sinks the riffer publishes to. | |
| AxePhraseMaker * | mPhraseMaker |
| Phrase maker AxingSTG installs. | |
Producer of the automatic riff a guitar track plays when it is not being played.
Its RTTI descriptor is at 0x008eef38. It derives from MsgSink at offset 0. The base vptr lands at +0x00, and this class's members start at +0x04. Its table is at 0x007dd488 with four entries. The object is 0x4c bytes, measured by AxingSTG's tagged allocation.
Slot 0 of the table at 0x007dd488 addresses the accessor at 0x0019a490. The accessor guards on the descriptor at 0x008eef38, and the descriptor settles the class name.
The source at +0x30 is a data member rather than a base. The constructor constructs it at that offset, and every caller calls MsgSource::AddSink() on it directly rather than through a vptr.
DispatchPriv() dispatches five identities. A PitchRiffMsg goes to OnPitchRiff(), an EraseMsg to OnErase(), a StopRiffMsg to OnStopRiff(), and a GameOverMsg to StopRiff() at position 0. A TrackSelectMsg runs the inline copy of OnTrackSelect().
The file-local command class Cmd, in the anonymous namespace of GsAutoRiffer.cpp, runs OnCommand() at the position PlayRiff() schedules.
| AutoRiffer::AutoRiffer | ( | Sch::TickClock * | pClock, |
| Quantizer * | pQuantizer, | ||
| const TrackData * | pTrackData ) |
| pClock | The clock the riffer schedules against. |
| pQuantizer | The quantiser for the track. |
| pTrackData | The track description. |
|
virtual |
|
virtual |
Act on a message.
| pMsg | The message. |
Implements MsgSink.
| void AutoRiffer::OnCommand | ( | int | nTick | ) |
Repeat the current riff at a song position, or release the buttons.
The file-local Cmd runs it. When AxePhraseMaker::IsBarPlayable() reports 1 for the bar of the position, it plays the current riff again through PlayRiff(). Otherwise it sends an AxeButtonMsg for mPlayer that releases every button.
| nTick | The song position the command was scheduled for. |
| void AutoRiffer::AddSink | ( | MsgSink * | pSink | ) |
Add a sink to mSource.
The image has no caller. AxingSTG calls MsgSource::AddSink() on mSource directly.
| pSink | The sink. |
| MuseSynth* AutoRiffer::mSynth |
Synthesiser AxingSTG installs while it wires the stage up.
The constructor clears this member and the one below, and AxingSTG::ConnectInputs() writes both from outside the class. Those outside writes record them public. A friend declaration on AxingSTG fits the image equally well.
+0x2c
| MsgSource AutoRiffer::mSource |
Sinks the riffer publishes to.
+0x30
| AxePhraseMaker* AutoRiffer::mPhraseMaker |