41 #define ASND_LIB 0x100 42 #define SND_LIB (ASND_LIB+2) 54 #define SND_INVALID -1 55 #define SND_ISNOTASONGVOICE -2 70 #define VOICE_MONO_8BIT 0 71 #define VOICE_MONO_16BIT 1 72 #define VOICE_MONO_16BIT_BE 1 73 #define VOICE_STEREO_8BIT 2 74 #define VOICE_STEREO_16BIT 3 75 #define VOICE_STEREO_16BIT_BE 3 76 #define VOICE_MONO_8BIT_U 4 77 #define VOICE_MONO_16BIT_LE 5 78 #define VOICE_STEREO_8BIT_U 6 79 #define VOICE_STEREO_16BIT_LE 7 86 #define MID_VOLUME 127 87 #define MAX_VOLUME 255 94 #define F44100HZ_PITCH 44100 95 #define MAX_PITCH 144000 96 #define INIT_RATE_48000 144 #define NOTE(note,octave) (note+(octave<<3)+(octave<<2)) 153 #define Note2Freq ANote2Freq 154 #define SND_Init ASND_Init 155 #define SND_End ASND_End 156 #define SND_Pause ASND_Pause 157 #define SND_Is_Paused ASND_Is_Paused 158 #define SND_GetTime ASND_GetTime 159 #define SND_GetSampleCounter ASND_GetSampleCounter 160 #define SND_GetSamplesPerTick ASND_GetSamplesPerTick 161 #define SND_SetTime ASND_SetTime 162 #define SND_SetCallback ASND_SetCallback 163 #define SND_GetAudioRate ASND_GetAudioRate 164 #define SND_SetVoice ASND_SetVoice 165 #define SND_AddVoice ASND_AddVoice 166 #define SND_StopVoice ASND_StopVoice 167 #define SND_PauseVoice ASND_PauseVoice 168 #define SND_StatusVoice ASND_StatusVoice 169 #define SND_GetFirstUnusedVoice ASND_GetFirstUnusedVoice 170 #define SND_ChangePitchVoice ASND_ChangePitchVoice 171 #define SND_ChangeVolumeVoice ASND_ChangeVolumeVoice 172 #define SND_ChangeVolumeVoice ASND_ChangeVolumeVoice 173 #define SND_GetTickCounterVoice ASND_GetTickCounterVoice 174 #define SND_GetTimerVoice ASND_GetTimerVoice 175 #define SND_TestPointer ASND_TestPointer Definition: asndlib.h:119
Definition: asndlib.h:132
u32 ASND_GetTimerVoice(s32 voice)
Returns the voice playback time.
Definition: asndlib.h:137
Definition: asndlib.h:129
int32_t s32
32bit signed integer
Definition: gctypes.h:24
s32 ASND_GetAudioRate()
Returns the current audio rate.
Definition: asndlib.h:141
Definition: asndlib.h:105
Definition: asndlib.h:111
Definition: asndlib.h:113
Definition: asndlib.h:140
s32 ASND_StatusVoice(s32 voice)
Returns the status of the selected voice.
s32 ASND_StopVoice(s32 voice)
Stops the selected voice.
Definition: asndlib.h:116
s32 ASND_Is_Paused()
Returns sound paused status.
s32 ASND_GetFirstUnusedVoice()
Returns the first unused voice.
Definition: asndlib.h:128
Definition: asndlib.h:126
GLsizei const GLvoid * pointer
Definition: glext.h:6488
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
Definition: asndlib.h:127
s32 ASND_SetVoice(s32 voice, s32 format, s32 pitch, s32 delay, void *snd, s32 size_snd, s32 volume_l, s32 volume_r, ASNDVoiceCallback callback)
Sets a PCM voice to play.
u32 ASND_GetTickCounterVoice(s32 voice)
Returns the voice tick counter.
Definition: asndlib.h:131
Definition: asndlib.h:115
s32 ASND_SetInfiniteVoice(s32 voice, s32 format, s32 pitch, s32 delay, void *snd, s32 size_snd, s32 volume_l, s32 volume_r)
Sets a PCM voice to play infinitely.
void callback(s32 result, dvdcmdblk *block)
Definition: dvd.c:2293
void ASND_Init()
Initializes the ASND lib and fixes the hardware sample rate to 48000.
Definition: asndlib.h:109
Definition: asndlib.h:114
s32 ASND_TestVoiceBufferReady(s32 voice)
Tests to determine if the voice is ready to receive a new buffer sample with ASND_AddVoice().
Definition: asndlib.h:134
void ASND_End()
De-initializes the ASND lib.
s32 ASND_AddVoice(s32 voice, void *snd, s32 size_snd)
Adds a PCM voice to play from the second buffer.
u32 ASND_GetTime()
Returns the global time.
Definition: asndlib.h:125
Definition: asndlib.h:108
s32 ASND_TestPointer(s32 voice, void *pointer)
Tests if pointer is in use by voice as a buffer.
void ASND_SetCallback(void(*callback)())
Sets a global callback for general purposes.
s32 ASND_ChangeVolumeVoice(s32 voice, s32 volume_l, s32 volume_r)
Changes the voice volume in real-time.
Definition: asndlib.h:112
u32 ASND_GetDSP_PercentUse()
Returns the DSP usage.
time_t time(time_t *timer)
s32 ASND_ChangePitchVoice(s32 voice, s32 pitch)
Changes the voice pitch in real-time.
s32 ASND_PauseVoice(s32 voice, s32 pause)
Pauses the selected voice.
void(* ASNDVoiceCallback)(s32 voice)
Callback type for ASND_SetVoice().
Definition: asndlib.h:181
u32 ASND_GetDSP_ProcessTime()
Definition: asndlib.h:104
void ASND_SetTime(u32 time)
Set the global time.
u32 ASND_GetSampleCounter()
Retrieves the global sample counter.
Definition: asndlib.h:110
Definition: asndlib.h:130
Definition: asndlib.h:133
Definition: asndlib.h:138
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
Definition: asndlib.h:120
Definition: asndlib.h:107
int ANote2Freq(int note, int freq_base, int note_base)
Initializes the SND lib and fixes the hardware sample rate.
Definition: asndlib.h:106
Definition: asndlib.h:118
void ASND_Pause(s32 paused)
Used to pause (or unpause) the sound.
Definition: asndlib.h:136
Definition: asndlib.h:117
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
Definition: asndlib.h:139
u32 ASND_GetSamplesPerTick()
Retrieves the samples sent from the IRQ in one tick.
Definition: asndlib.h:135