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(u8)   SndPauseMOD(u8)
 Pause the mod ! Thanks to Deku for that :p

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_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_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_PlayFSStreamSoundEx2 (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 and how to loop it, from PAFS with a stream effect
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_UnpauseStream (u8 PA_Channel)
 Stop a Stream
u8 PA_SoundChannelIsBusy (u8 PA_Channel)
 Check if a channel is busy...
s8 PA_GetFreeSoundChannel (void)
 Get the first available channel
void PA_SetSoundChannelVol (u8 PA_Channel, u8 Volume)
 Change the volume of a playing sound
void PA_SetSoundVol (u8 Volume)
 Set the master sound volume
void PA_SetSoundChannelPan (u8 PA_Channel, u8 Pan)
 Change the pan of a playing sound

Detailed Description

Play sounds, etc...

Define Documentation

#define PA_PauseMod u8   )     SndPauseMOD(u8)
 

Pause the mod ! Thanks to Deku for that :p

Parameters:
u8 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...

 
#define PA_StopMod  )     SndStopMOD()
 

Stop playing the mod ! Thanks to Deku for that :p


Function Documentation

void FillTheGap u8  PA_Channel,
u32  size
 

Fill datas in a stream tab

inline s8 PA_GetFreeSoundChannel void   )  [inline]
 

Get the first available channel

void PA_InitSound void   )  [inline]
 

Initialise the Sound system, for mods and sound effects

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_PlayFSStreamSoundEx2 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 and how to loop it, from PAFS with a stream effect

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_RegenStream void   ) 
 

Test if a stream need regen

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.

inline void PA_SetSoundChannelPan u8  PA_Channel,
u8  Pan
[inline]
 

Change the pan of a playing sound

Parameters:
PA_Channel Audio channel, from 0 to 7
Pan Pan, from 0 to 127. (left-right)

inline void PA_SetSoundChannelVol u8  PA_Channel,
u8  Volume
[inline]
 

Change the volume of a playing sound

Parameters:
PA_Channel Audio channel, from 0 to 7
Volume Volume, from 0 to 127.

inline void PA_SetSoundVol u8  Volume  )  [inline]
 

Set the master sound volume

Parameters:
Volume Volume, from 0 to 127.

inline u8 PA_SoundChannelIsBusy u8  PA_Channel  )  [inline]
 

Check if a channel is busy...

Parameters:
PA_Channel Audio channel, from 0 to 15

void PA_UnpauseStream u8  PA_Channel  ) 
 

Stop a Stream

Parameters:
PA_Channel Audio channel, from 0 to 15


Generated on Tue Jan 30 23:10:12 2007 for PAlib by  doxygen 1.3.9.1