Sound ARM9 functions


Defines

#define PA_PlaySimpleSound(PA_Channel, sound)   PA_PlaySoundEx(PA_Channel, (void*)sound, (u32)sound##_size, PA_SoundOption.volume, PA_SoundOption.freq, PA_SoundOption.format)
 Simplest sound playing function... Takes the default options for volume, format, and rate (11025). You can change these options by using PA_SetDefaultSound
#define PA_PlayMod(mod_snd)   SndPlayMOD((u8*)mod_snd)
 Play a mod ! Thanks to Deku for that :p
#define PA_StopMod()   SndStopMOD()
 Stop playing the mod ! Thanks to Deku for that :p
#define PA_PauseMod(bool)   SndPauseMOD(bool)
 Pause the mod ! Thanks to Deku for that :p
#define PA_MicStopRecording()   StopRecording()
 Stop Recording

Functions

void PA_SetDefaultSound (u8 volume, int freq, s16 format)
 Set the default sound options (for the PlaySimpleSound function)
void PA_InitSound (void)
 Initialise the Sound system, for mods and sound effects
void PA_InitStreamSound (void)
void PA_RegenStream (void)
 Test if a stream need regen
void FillTheGap (u8 PA_Channel, u32 size)
 Fill datas in a stream tab
void PA_PlaySoundEx2 (u8 PA_Channel, const void *data, s32 length, u8 volume, int freq, s16 format, BOOL repeat, int repeatPoint)
 Play a given sound effect, but chose your format
void PA_PlaySoundEx (u8 PA_Channel, const void *data, s32 length, u8 volume, int freq, s16 format)
 Play a given sound effect, but chose your format
void PA_PlayGBFSSoundEx (u8 PA_Channel, u16 FS_wav_number, u8 volume, int freq, s16 format)
 Play a given sound effect, but chose your format, from GBFS
void PA_PlayGBFSSoundEx2 (u8 PA_Channel, u16 FS_wav_number, u8 volume, int freq, s16 format, BOOL repeat, int repeatPoint)
 Play a given sound effect, but chose your format and how to loop it, from GBFS
void PA_PlayGBFSStreamSoundEx2 (u8 PA_Channel, u16 FS_wav_number, u8 volume, int freq, s16 format, BOOL repeat, int repeatPoint)
void PA_PlayFSSoundEx (u8 PA_Channel, u16 PAFS_wav_number, u8 volume, int freq, s16 format)
 Play a given sound effect, but chose your format, from PAFS
void PA_PlayFSSoundEx2 (u8 PA_Channel, u16 PAFS_wav_number, u8 volume, int freq, s16 format, BOOL repeat, int repeatPoint)
 Play a given sound effect, but chose your format, from PAFS
void PA_PlaySound (u8 PA_Channel, const void *data, s32 length, u8 volume, u32 freq)
 Play a given sound effect, with default format (raw)
void PA_PlayGBFSSound (u8 PA_Channel, u16 FS_wav_number, u8 volume, u32 freq)
 Play a given sound effect, with default format (raw), from GBFS
void PA_PlayFSSound (u8 PA_Channel, u16 PAFS_wav_number, u8 volume, u32 freq)
 Play a given sound effect, with default format (raw), from PAFS
void PA_PlayGBFSSimpleSound (u8 PA_Channel, u16 FS_wav_number)
 Simplest sound playing function... From GBFS... Takes the default options for volume, format, and rate (11025). You can change these options by using PA_SetDefaultSound
void PA_PlayFSSimpleSound (u8 PA_Channel, u16 PAFS_wav_number)
 Simplest sound playing function... From PAFS... Takes the default options for volume, format, and rate (11025). You can change these options by using PA_SetDefaultSound
void PA_PlayGBFSMod (u16 FS_mod_number)
 Play a mod from GBFS... Warning, it copies to RAM, so big mods will make the DS crash...
void PA_PlayFSMod (u16 PAFS_mod_number)
 Play a mod from PAFS... Warning, it copies to RAM, so big mods will make the DS crash...
void PA_StopStream (u8 PA_Channel)
void PA_PauseStream (u8 PA_Channel)
void PA_UnpauseStream (u8 PA_Channel)
 Stop a Stream
void PA_MicStartRecording (s8 *buffer, int length)

Detailed Description

Play sounds, etc...

Define Documentation

#define PA_PauseMod bool   )     SndPauseMOD(bool)
 

Pause the mod ! Thanks to Deku for that :p

Parameters:
bool 0 or 1...

#define PA_PlayMod mod_snd   )     SndPlayMOD((u8*)mod_snd)
 

Play a mod ! Thanks to Deku for that :p

Parameters:
mod_snd Mod name

#define PA_PlaySimpleSound PA_Channel,
sound   )     PA_PlaySoundEx(PA_Channel, (void*)sound, (u32)sound##_size, PA_SoundOption.volume, PA_SoundOption.freq, PA_SoundOption.format)
 

Simplest sound playing function... Takes the default options for volume, format, and rate (11025). You can change these options by using PA_SetDefaultSound

Parameters:
PA_Channel Audio channel, from 0 to 7
sound Sound name...


Function Documentation

inline void PA_PlayFSMod u16  PAFS_mod_number  )  [inline]
 

Play a mod from PAFS... Warning, it copies to RAM, so big mods will make the DS crash...

Parameters:
FS_mod_number Mod's PA GBFS file number

inline void PA_PlayFSSimpleSound u8  PA_Channel,
u16  PAFS_wav_number
[inline]
 

Simplest sound playing function... From PAFS... Takes the default options for volume, format, and rate (11025). You can change these options by using PA_SetDefaultSound

Parameters:
PA_Channel Audio channel, from 0 to 7
PAFS_wav_number Number of your sound RAW file in the PA GBFS system

inline void PA_PlayFSSound u8  PA_Channel,
u16  PAFS_wav_number,
u8  volume,
u32  freq
[inline]
 

Play a given sound effect, with default format (raw), from PAFS

Parameters:
PA_Channel Audio channel, from 0 to 7
PAFS_wav_number Number of your sound RAW file in the PA GBFS system
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default

inline void PA_PlayFSSoundEx u8  PA_Channel,
u16  PAFS_wav_number,
u8  volume,
int  freq,
s16  format
[inline]
 

Play a given sound effect, but chose your format, from PAFS

Parameters:
PA_Channel Audio channel, from 0 to 7
PAFS_wav_number Number of your sound RAW file in the PA GBFS system
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default
format Sound format.

inline void PA_PlayFSSoundEx2 u8  PA_Channel,
u16  PAFS_wav_number,
u8  volume,
int  freq,
s16  format,
BOOL  repeat,
int  repeatPoint
[inline]
 

Play a given sound effect, but chose your format, from PAFS

Parameters:
PA_Channel Audio channel, from 0 to 7
PAFS_wav_number Number of your sound RAW file in the PA GBFS system
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default
format Sound format.
format Loop true/false
format Repeat point

inline void PA_PlayGBFSMod u16  FS_mod_number  )  [inline]
 

Play a mod from GBFS... Warning, it copies to RAM, so big mods will make the DS crash...

Parameters:
FS_mod_number Mod's PA GBFS file number

inline void PA_PlayGBFSSimpleSound u8  PA_Channel,
u16  FS_wav_number
[inline]
 

Simplest sound playing function... From GBFS... Takes the default options for volume, format, and rate (11025). You can change these options by using PA_SetDefaultSound

Parameters:
PA_Channel Audio channel, from 0 to 7
FS_wav_number Number of your sound RAW file in the PA GBFS system

inline void PA_PlayGBFSSound u8  PA_Channel,
u16  FS_wav_number,
u8  volume,
u32  freq
[inline]
 

Play a given sound effect, with default format (raw), from GBFS

Parameters:
PA_Channel Audio channel, from 0 to 7
FS_wav_number Number of your sound RAW file in the PA GBFS system
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default

inline void PA_PlayGBFSSoundEx u8  PA_Channel,
u16  FS_wav_number,
u8  volume,
int  freq,
s16  format
[inline]
 

Play a given sound effect, but chose your format, from GBFS

Parameters:
PA_Channel Audio channel, from 0 to 7
FS_wav_number Number of your sound RAW file in the PA GBFS system
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default
format Sound format.

inline void PA_PlayGBFSSoundEx2 u8  PA_Channel,
u16  FS_wav_number,
u8  volume,
int  freq,
s16  format,
BOOL  repeat,
int  repeatPoint
[inline]
 

Play a given sound effect, but chose your format and how to loop it, from GBFS

Parameters:
PA_Channel Audio channel, from 0 to 7
FS_wav_number Number of your sound RAW file in the PA GBFS system
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default
format Sound format.
format Loop true/false
format Repeat point

inline void PA_PlaySound u8  PA_Channel,
const void *  data,
s32  length,
u8  volume,
u32  freq
[inline]
 

Play a given sound effect, with default format (raw)

Parameters:
PA_Channel Audio channel, from 0 to 7
data Sound data
length Sound length, with (u32)sound_size
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default

void PA_PlaySoundEx u8  PA_Channel,
const void *  data,
s32  length,
u8  volume,
int  freq,
s16  format
[inline]
 

Play a given sound effect, but chose your format

Parameters:
PA_Channel Audio channel, from 0 to 7
data Sound data
length Sound length, with (u32)sound_size
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default
format Sound format. 0 8 bits 1 16 bits 2 ADPCM 3 PSG

void PA_PlaySoundEx2 u8  PA_Channel,
const void *  data,
s32  length,
u8  volume,
int  freq,
s16  format,
BOOL  repeat,
int  repeatPoint
 

Play a given sound effect, but chose your format

Parameters:
PA_Channel Audio channel, from 0 to 7
data Sound data
length Sound length, with (u32)sound_size
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default
format Sound format.
format Loop true/false
format Repeat point

void PA_SetDefaultSound u8  volume,
int  freq,
s16  format
 

Set the default sound options (for the PlaySimpleSound function)

Parameters:
volume Volume, from 0 to 127. 64 if not used
freq Sound frequence, depends on the sound... 11025 by default
format Sound format.

void PA_UnpauseStream u8  PA_Channel  ) 
 

Stop a Stream

Parameters:
PA_Channel Audio channel, from 0 to 16


Generated on Tue Jan 31 17:31:31 2006 for PAlib by  doxygen 1.3.9.1