libogc  v2.5.0
Functions
sound functions

Functions

void ASND_End (void)
 De-initializes the ASND lib. More...
 
s32 ASND_GetAudioRate (void)
 Returns the current audio rate. More...
 
u32 ASND_GetSampleCounter (void)
 Retrieves the global sample counter. More...
 
u32 ASND_GetSamplesPerTick (void)
 Retrieves the samples sent from the IRQ in one tick. More...
 
u32 ASND_GetTime (void)
 Returns the global time. More...
 
void ASND_Init (void)
 Initializes the ASND lib and fixes the hardware sample rate to 48000. More...
 
s32 ASND_Is_Paused (void)
 Returns sound paused status. More...
 
void ASND_Pause (s32 paused)
 Used to pause (or unpause) the sound. More...
 
void ASND_SetCallback (void(*callback)(void))
 Sets a global callback for general purposes. More...
 
void ASND_SetTime (u32 time)
 Set the global time. More...
 

Detailed Description

Function Documentation

◆ ASND_End()

void ASND_End ( void  )

De-initializes the ASND lib.

Returns
None.

◆ ASND_GetAudioRate()

s32 ASND_GetAudioRate ( void  )

Returns the current audio rate.

Note
This function is implemented for compatibility with SNDLIB.
Returns
Audio rate (48000).

◆ ASND_GetSampleCounter()

u32 ASND_GetSampleCounter ( void  )

Retrieves the global sample counter.

This counter is updated from the IRQ in steps of ASND_GetSamplesPerTick().

Note
You can use this to implement one timer with high precision.
Returns
Current sample.

◆ ASND_GetSamplesPerTick()

u32 ASND_GetSamplesPerTick ( void  )

Retrieves the samples sent from the IRQ in one tick.

Returns
Samples per tick.

◆ ASND_GetTime()

u32 ASND_GetTime ( void  )

Returns the global time.

The time is updated from the IRQ.

Returns
The current time, in milliseconds.

◆ ASND_Init()

void ASND_Init ( void  )

Initializes the ASND lib and fixes the hardware sample rate to 48000.

Returns
None.

◆ ASND_Is_Paused()

s32 ASND_Is_Paused ( void  )

Returns sound paused status.

Returns
1 if paused, 0 if unpaused.

◆ ASND_Pause()

void ASND_Pause ( s32  paused)

Used to pause (or unpause) the sound.

Note
The sound starts paused when ASND_Init() is called.
Parameters
[in]pausedIf 1, sound is paused; sound can be unpaused with 0.
Returns
None.

◆ ASND_SetCallback()

void ASND_SetCallback ( void(*)(void)  callback)

Sets a global callback for general purposes.

This callback is called from the IRQ.

Parameters
[in]callbackCallback function to assign.
Returns
None.

◆ ASND_SetTime()

void ASND_SetTime ( u32  time)

Set the global time.

This time is updated from the IRQ.

Parameters
[in]timeFix the current time, in milliseconds.
Returns
None.