Driver initialization. Must be called first before accessing any other functions
| void NDP_SetMusicData( |
| ) |
Song data start address setting
| addr const void* | Address of the music data. This should point to a .NDP binary data without the 7 bytes BASIC headers |
Start playing (clears the work area to zero and starts playing from music start)
Stops playback
Update a music frame. Must be called at each graphics frame; ideally from the interrupt code.
Release the driver. Only needed if you would like to initilize the driver again
Temporary mute channel A
| frames | Number of frames to mute (1:Cancel, 2 to 254:Duraton, 255:Permanent) |
Temporary mute channel B
| frames | Number of frames to mute (1:Cancel, 2 to 254:Duraton, 255:Permanent) |
Temporary mute channel C
| frames | Number of frames to mute (1:Cancel, 2 to 254:Duraton, 255:Permanent) |
| inline void NDP_MuteChannel( |
| ) |
Temporary mute the given channel
| channel u8 | Channel number |
NDP_CHANNEL_A
NDP_CHANNEL_B
NDP_CHANNEL_C
frames - Number of frames to mute (1:Cancel, 2 to 254:Duraton, 255:Permanent)
| void NDP_SetVolume( |
| ) |
Set master volume
| vol u8 | New master volume |
| void NDP_FadeOut( |
| ) |
Start fade-out current music
| speed u8 | Number of frames for each stage (the small the quicker) |
| void NDP_PlayFadeIn( |
| ) |
Starts playing music while fading-in
| speed u8 | Number of frames for each stage (the small the quicker) |
| void NDP_SetToneColor( |
| ) |
Set tone color data
| addr const void* | Address of tone color definition table |
Driver version number
NDP driver version (for example, 0x0104 is version 1.0.4)
| inline void NDP_SetInitFlag( |
| ) |
Set initialization flag
| inline void NDP_SetSFXData( |
| ) |
Set sound effects data address
| addr const void* | Address of the sound effects data. This should point to a .NDS binary data without the 7 bytes BASIC headers |
Get the number of sound effect into the current bank. NDP_SetSFXData must be called first
Number of sound effect in the current bank
| inline u16 NDP_GetSFXOffset( |
| ) |
Get the offset of a given sound effect into the current bank. NDP_SetSFXData must be called first
| sfx u8 | Index of the sound effect |
Offset of the given sound effect from the start of the bank data
| void NDP_PlaySFX( |
| ) |
Play a given sound effect. NDP_SetSFXData must be called first
| sfx u8 | Index of the sound effect to playback |
Playing status (NDP_STATUS_xxx)
NDP_STATUS_STOPPED
NDP_STATUS_PLAYING
Whether or not music is currently playing
FALSE if music is not playing
Whether or not music is currently stopped
FALSE if music is not stopped
| inline bool NDP_HasTrackEnded( |
| ) |
Whether or not each track has reached the end
| track u8 | ID of the track |
NDP_TRACK_1
NDP_TRACK_2
NDP_TRACK_3
NDP_TRACK_RYTHM
NDP_TRACK_ALL
FALSE if the given track hasn't reached its end
Whether or not all tracks have reached the end
FALSE if the music hasn't reached the end
Number of times the music has looped
If the music does not have an infinite loop, check +0BH in the music data and return 255 when the music finishes playing
Fade setting
0: No fade
1–255: Fade count
Get th fade type
NDP_FADE_OUT
NDP_FADE_IN
Is the driver initialized
FALSE if driver not initialized