libmsx
C library for MSX
|
The replayer APIs of the NDP sound driver. More...
Functions | |
void | NDP_init (void) |
MSX Initialize the NDP sound driver. | |
uint16_t | NDP_version (void) |
MSX Return the version code of the NDP sound driver. | |
void | NDP_play (void) |
MSX Main routine of the NDP sound driver. | |
void | NDP_start (void) |
MSX Start / Resume music. | |
void | NDP_pause (void) |
MSX Pause music. | |
bool | NDP_is_paused (void) |
MSX Return whether paused or not. | |
void | NDP_stop (void) |
MSX Stop music. | |
void | NDP_set_volume (uint8_t vol) |
MSX Set maximum main-volume. | |
void | NDP_fadeout (uint8_t wait) |
MSX Fade-out and stop music. | |
void | NDP_fadein (uint8_t wait) |
MSX Fade-in and start music. | |
bool | NDP_is_playing (void) |
MSX Return whether BGM is playing or not. | |
uint8_t | NDP_get_track_status (void) |
MSX Return status for each tracks. | |
uint8_t | NDP_get_loop_counter (void) |
MSX Return the loop counter value. | |
The replayer APIs of the NDP sound driver.
void NDP_init | ( | void | ) |
MSX
Initialize the NDP sound driver.
This function must be called once. In particular, it must be called before the first call to any other NDP APIs.
uint16_t NDP_version | ( | void | ) |
MSX
Return the version code of the NDP sound driver.
Return the 2-byte version code (major << 8) | (minor)
.
If major
is 0
, it means version “0.9.minor”, otherwise it means version “major.minor”.
For example,
0x010A
for version 1.100x0003
for version 0.9.3void NDP_play | ( | void | ) |
MSX
Main routine of the NDP sound driver.
To play back background music, this function must be called at each VSYNC timing.
The easiest way is to set this function as the VSYNC interrupt handler by calling set_vsync_handler().
void NDP_start | ( | void | ) |
MSX
Start / Resume music.
void NDP_pause | ( | void | ) |
MSX
Pause music.
bool NDP_is_paused | ( | void | ) |
MSX
Return whether paused or not.
true
if paused. void NDP_stop | ( | void | ) |
MSX
Stop music.
void NDP_set_volume | ( | uint8_t | vol | ) |
MSX
Set maximum main-volume.
vol | Volume (0..15) |
void NDP_fadeout | ( | uint8_t | wait | ) |
MSX
Fade-out and stop music.
wait | Number of VSYNC frames per step of fade-out (wait count). |
void NDP_fadein | ( | uint8_t | wait | ) |
MSX
Fade-in and start music.
wait | Number of VSYNC frames per step of fade-in (wait count). |
bool NDP_is_playing | ( | void | ) |
MSX
Return whether BGM is playing or not.
true
if BGM is playing. uint8_t NDP_get_track_status | ( | void | ) |
MSX
Return status for each tracks.
uint8_t NDP_get_loop_counter | ( | void | ) |
MSX
Return the loop counter value.
The loop counter starts at 0 and counts up when the song loops back.
In case of overflow (exceeding 255), the counter returns to 0.