Loading...
Searching...
No Matches
Sample Management

Functions

u16 audioGetFreeMemory (void)
 Get available SPC700 RAM for samples.
 
u8 audioGetSampleInfo (u8 id, AudioSample *info)
 Get information about a loaded sample.
 
u8 audioLoadSample (u8 id, const u8 *brrData, u16 size, u16 loopPoint)
 Load a BRR sample into SPC700 RAM.
 
void audioUnloadSample (u8 id)
 Unload a sample from a slot.
 

Detailed Description

Function Documentation

◆ audioGetFreeMemory()

u16 audioGetFreeMemory ( void  )

Get available SPC700 RAM for samples.

Returns
Free bytes available

◆ audioGetSampleInfo()

u8 audioGetSampleInfo ( u8  id,
AudioSample info 
)

Get information about a loaded sample.

Parameters
idSample ID
infoPointer to AudioSample struct to fill
Returns
AUDIO_OK if loaded, AUDIO_ERR_NOT_LOADED otherwise

◆ audioLoadSample()

u8 audioLoadSample ( u8  id,
const u8 brrData,
u16  size,
u16  loopPoint 
)

Load a BRR sample into SPC700 RAM.

Parameters
idSample slot (0-63)
brrDataPointer to BRR sample data
sizeSize in bytes (must be multiple of 9)
loopPointLoop offset in bytes, or 0 for no loop
Returns
AUDIO_OK on success, or error code
extern u8 explosion_brr[];
static u16 bx
Definition main.c:159
u8 audioLoadSample(u8 id, const u8 *brrData, u16 size, u16 loopPoint)
Load a BRR sample into SPC700 RAM.
unsigned char u8
8-bit unsigned integer (0 to 255)
Definition types.h:46

◆ audioUnloadSample()

void audioUnloadSample ( u8  id)

Unload a sample from a slot.

Parameters
idSample slot (0-63)

Any voices playing this sample will be stopped.