musicdata#

Variables#

const int

ID

const bool

Active

int

MIDI

const bool

IsEnhanced

int

Track

int

LoopStart

int

LoopEnd

int

CrossfadeIn

int

CrossfadeOut

Functions#

void

GetPath(char32[] buffer)

void

SetPath(char32[] filename)

void

GetName(char32[] buffer)

void

SetName(char32[] name)

void

Play()

Variable descriptions#

const int ID πŸ”— Source

The ID of this music data. If ID is > 0, this is a normal music ID. If ID is <= 0, this is a special value, and you should not use this pointer for anything other than it’s specified special purposes. (special pointers are MUSIC_TRIGGER_NONE: -2, MUSIC_INHERIT: -1, MUSIC_SILENCE: 0)


const bool Active πŸ”— Source

Returns true if this music is β€˜active’. The active music is whichever music is currently playing, though it remains β€˜active’ even if the music is paused via ex. Audio::PauseCurMIDI().

Always returns false for MUSIC_SILENCE.

If true, modifying the values of this music will immediately update the currently playing music.


int MIDI πŸ”— Source

value Special values: MIDI_NONE, MIDI_OVERWORLD, MIDI_DUNGEON, MIDI_LEVEL9. Values > 0 use that number midi.

The MIDI that plays for this music index. If an enhanced music is set, the MIDI will only be played if the enhanced music file is missing / fails to load.


const bool IsEnhanced πŸ”— Source

Returns true if enhanced music is set up on this music index. (Regardless of if it loads successfully or not) Returns false when the enhanced music path is blank.


int Track πŸ”— Source

The track number to use for enhanced music.


int LoopStart πŸ”— Source

The starting loop point for enhanced music in seconds.


int LoopEnd πŸ”— Source

The ending loop point for enhanced music in seconds.


int CrossfadeIn πŸ”— Source

The number of frames enhanced music fades in for.


int CrossfadeOut πŸ”— Source

The number of frames enhanced music fades out for.


Function descriptions#

void GetPath(char32[] buffer) πŸ”— Source

Fills the buffer with the music path to the enhanced music file being used. Empty string indicates enhanced music will not be used, and only the MIDI will be played.


void SetPath(char32[] filename) πŸ”— Source

Sets the path to the enhanced music file to use. An empty string or NULL pointer clears the enhanced music, so only the MIDI will be played.


void GetName(char32[] buffer) πŸ”— Source

Fills the buffer with the name of this musicdata.


void SetName(char32[] name) πŸ”— Source

Sets the name of this musicdata.


void Play() πŸ”— Source

Plays the specified music. If used on MUSIC_INHERIT, plays the currently assigned screen or dmap music. If used on MUSIC_SILENCE, stops currently playing music. Otherwise, tries to play the specified enhanced music. If the enhanced music is set to an empty string, or if it fails to load, the MIDI will be played instead.