wavelength 1.0.0
Loading...
Searching...
No Matches
MuseLooper Class Reference

Player that repeats a piece of music over a fixed number of ticks. More...

#include <muselooper.h>

Inheritance diagram for MuseLooper:

Classes

class  RepeatCmd
 Command that restarts the piece of a looper at the end of each loop. More...

Public Member Functions

 MuseLooper (Muse *pMuse, int nLength)
 Construct a stopped looper.
 ~MuseLooper ()
 Stop the piece and release it.
void Play (Scheduler *pScheduler, int nPosition)
 Start the piece at a position of the loop on a scheduler, stopping it first.
void Stop ()
 Stop the piece and withdraw the repeat.
bool IsPlaying () const
 Report whether the piece plays.
int GetLength () const
 Report the ticks of one loop.
int GetPosition () const
 Report the position of the scheduler in the current loop.

Detailed Description

Player that repeats a piece of music over a fixed number of ticks.

The RTTI includes the class name. The class is not polymorphic. Its nested command MuseLooper::RepeatCmd restarts the piece each time a loop ends.

Constructor & Destructor Documentation

◆ MuseLooper()

MuseLooper::MuseLooper ( Muse * pMuse,
int nLength )

Construct a stopped looper.

Parameters
pMuseThe piece.
nLengthThe ticks of one loop.
Ghidra address:
NTSC-U/C: 0x0015bd28
Ghidra address:
PAL: 0x0015d518

◆ ~MuseLooper()

MuseLooper::~MuseLooper ( )

Stop the piece and release it.

Ghidra address:
NTSC-U/C: 0x0015bda8
Ghidra address:
PAL: 0x0015d598

Member Function Documentation

◆ Play()

void MuseLooper::Play ( Scheduler * pScheduler,
int nPosition )

Start the piece at a position of the loop on a scheduler, stopping it first.

Parameters
pSchedulerThe scheduler.
nPositionThe position, taken modulo the length of the loop.
Ghidra address:
NTSC-U/C: 0x0015be10
Ghidra address:
PAL: 0x0015d600

◆ Stop()

void MuseLooper::Stop ( )

Stop the piece and withdraw the repeat.

Ghidra address:
NTSC-U/C: 0x0015bec0
Ghidra address:
PAL: 0x0015d6b0

◆ IsPlaying()

bool MuseLooper::IsPlaying ( ) const

Report whether the piece plays.

Returns
Whether the piece plays.
Ghidra address:
NTSC-U/C: 0x0015bf20
Ghidra address:
PAL: 0x0015d710

◆ GetLength()

int MuseLooper::GetLength ( ) const

Report the ticks of one loop.

Returns
The ticks.
Ghidra address:
NTSC-U/C: 0x0015be08
Ghidra address:
PAL: 0x0015d5f8

◆ GetPosition()

int MuseLooper::GetPosition ( ) const

Report the position of the scheduler in the current loop.

Returns
The ticks since the current loop started.
Ghidra address:
NTSC-U/C: 0x0015bf30
Ghidra address:
PAL: 0x0015d720

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