libmsx
C library for MSX
|
Data Structures | |
struct | NDSFile |
MSX Container of an opened NDS sound effects data. More... | |
Typedefs | |
typedef struct NDSFile | NDSFile |
MSX Container of an opened NDS sound effects data. | |
Functions | |
int | NDP_open_sfx_mem (NDSFile *nds, const uint8_t *loc, size_t size) |
MSX Open NDS sound effects data stored in ROM / RAM. | |
int | NDP_open_sfx_bmem (NDSFile *nds, bmemptr_t loc, uint32_t size) |
MSX Open NDS sound effects data stored in banked memory (MegaROM). | |
int | NDP_open_sfx_resource (NDSFile *nds, const char *path) |
MSX Open NDS file stored as named resources in banked memory (MegaROM). | |
void | NDP_set_sfx_ptr (void *ptr) |
MSX Setup the NDS sound effects data to NDP sound driver. | |
size_t | NDP_read_sfx (uint8_t index, NDSFile *nds, uint8_t *buf, size_t buf_size) |
MSX Read the NDS sound effects data. | |
bool | NDP_load_sfx (uint8_t index, NDSFile *nds, uint8_t *buf, size_t buf_size) |
MSX Load and setup the NDS sound effects data to NDP sound driver. | |
struct NDSFile |
typedef struct NDSFile NDSFile |
MSX
Container of an opened NDS sound effects data.
int NDP_open_sfx_mem | ( | NDSFile * | nds, |
const uint8_t * | loc, | ||
size_t | size ) |
MSX
Open NDS sound effects data stored in ROM / RAM.
nds | Pointer to a NDSFile to be initialized. |
loc | Location of the NDS sound effects data. |
size | Size in bytes. |
MSX
Open NDS sound effects data stored in banked memory (MegaROM).
nds | Pointer to a NDSFile to be initialized. |
loc | Location of the NDS sound effects data. |
size | Size in bytes. |
int NDP_open_sfx_resource | ( | NDSFile * | nds, |
const char * | path ) |
MSX
Open NDS file stored as named resources in banked memory (MegaROM).
nds | Pointer to a NDSFile to be initialized. |
path | Path/File name (*.NDS) of the resource. |
void NDP_set_sfx_ptr | ( | void * | ptr | ) |
MSX
Setup the NDS sound effects data to NDP sound driver.
ptr | Pointer to the sound effects data. |
size_t NDP_read_sfx | ( | uint8_t | index, |
NDSFile * | nds, | ||
uint8_t * | buf, | ||
size_t | buf_size ) |
MSX
Read the NDS sound effects data.
Read the specified sound effects data from the NDSFile into the specified RAM buffer.
index | Sound effect number. |
nds | Pointer to the NDSFile opened by NDP_open_sfx_*() . |
buf | Pointer to RAM buffer. |
buf_size | Size of the buffer. |
0
otherwise. bool NDP_load_sfx | ( | uint8_t | index, |
NDSFile * | nds, | ||
uint8_t * | buf, | ||
size_t | buf_size ) |
MSX
Load and setup the NDS sound effects data to NDP sound driver.
Read the specified sound effects data from the NDSFile into the specified RAM buffer, and set the NDP sound driver to play the sound effects from the buffer.
This is almost same as the following code:
index | Sound effect number. |
nds | Pointer to the NDSFile opened by NDP_open_sfx_*() . |
buf | Pointer to RAM buffer. |
buf_size | Size of the buffer. |
true
on success, false
otherwise.