|
| static void | Stop (float fFadeStep) |
| | Mute the menu music and prepare the sound output for clips.
|
| static void | End (bool bRestoreMusic) |
| | Fade out the clip, forget the clip to play, and enter kStateEnding.
|
| static bool | IsWaiting () |
| | Report whether the clip is in kStateReady.
|
| static void | Load (const char *pszSong, bool bMetaClip) |
| | Choose the clip of a song and fade out the clip that plays.
|
| static void | FadeOut () |
| | Start fading the clip out.
|
| static bool | IsIdle () |
| | Report whether no clip plays and none is chosen.
|
| static bool | IsPlaying () |
| | Report whether the clip is in kStateMenu, the state before Stop().
|
| static void | Poll () |
| | Advance the clip, fading its volume and starting or stopping its stream as requested.
|
The streamed clip of a song that plays while the song screen shows the song.
The class is not polymorphic and has no RTTI. The name is inferred. The clip is a state machine whose state is stored in globals, and every member is static. While the menu music plays the state is kStateMenu. Stop() switches the sound output to the effects of the clip, and a job the output runs afterwards sets kStateReady. Load() chooses a clip, and Poll() plays it, fading its volume in and out. End() fades the clip out. Once the clip has stopped, Poll() restores the effects of the menu music, and a job the output runs afterwards sets kStateMenu again.
| void SongPreview::Load |
( |
const char * | pszSong, |
|
|
bool | bMetaClip ) |
|
static |
Choose the clip of a song and fade out the clip that plays.
The two encrypted songs name their stream file directly. Any other song plays Songs/<song>/<song>_metaclip.str when bMetaClip is set, and audio/<song>.str, with the song name cut to eight characters, otherwise. In the PAL build a tutorial song (one whose name includes "TUT") plays Songs/<song>/<language>/<song>_metaclip.str in a language other than English.
- Parameters
-
| pszSong | The song, or one of the encrypted streams. |
| bMetaClip | Whether the song's own clip plays. |
- Ghidra address:
- NTSC-U/C: 0x001966b8
- Ghidra address:
- PAL: 0x0019db48