Maxmod
Functions
NDS: ARM7 Streaming

Functions

void mmStreamClose (void)
 Close audio stream.
 
mm_word mmStreamGetPosition (void)
 Get number of samples elapsed since the stream was opened. More...
 
void mmStreamOpen (mm_stream *stream, mm_addr wavebuffer, mm_addr workbuffer)
 Opens an audio stream. More...
 
void mmStreamUpdate (void)
 Check buffering state and fill stream with data. More...
 

Detailed Description

Function Documentation

◆ mmStreamGetPosition()

mm_word mmStreamGetPosition ( void  )

Get number of samples elapsed since the stream was opened.

The 32-bit value will wrap every 36 hours or so (at 32khz).

Returns
The nummber of samples.

◆ mmStreamOpen()

void mmStreamOpen ( mm_stream stream,
mm_addr  wavebuffer,
mm_addr  workbuffer 
)

Opens an audio stream.

See the tutorials for more information.

Caution: If you have some heavy interrupt-routines that are enabled while calling this function, you may corrupt the stream. The function cannot disable interrupts internally because it requires the communications to be active.

Parameters
streamPointer to a structure containing information about how the stream will operate.
wavebufferWave memory, must be aligned.
workbufferWork memory, must be aligned.

◆ mmStreamUpdate()

void mmStreamUpdate ( void  )

Check buffering state and fill stream with data.

Requests will be made to your callback to fill parts of the wave buffer(s). This function only needs to be called manually if the stream isn't in auto-fill mode. This function shouldn't be used when the stream is automatically filled.