Amulets & Armor  v1.02
Open Source Game
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Data Structures | Macros | Functions | Variables
SOUND

Sound System. More...

Data Structures

struct  T_SDLSoundBuffer
 
struct  T_soundBuffer
 

Macros

#define _PAN_CENTER   0x00008000
 
#define _PAN_LEFT   0x00000000
 
#define _PAN_RIGHT   0x0000ffff
 
#define ICheckLists()
 
#define SOUND_STREAM_NUM_SAMPLES   1024
 

Functions

T_void SoundFinish (T_void)
 
E_Boolean SoundGetAllowFreqShift (T_void)
 
T_byte8 SoundGetBackgroundVolume (T_void)
 
T_word16 SoundGetEffectsVolume (T_void)
 
T_void SoundInitialize (T_void)
 
E_Boolean SoundIsDone (T_word16 bufferId)
 
E_Boolean SoundIsOn (T_void)
 
T_sword16 SoundPlayByName (const char *filename, T_word16 volume)
 
T_sword16 SoundPlayByNameWithDetails (T_byte8 *filename, T_word16 volume, T_word16 frequency, T_word16 bits, E_Boolean isStereo)
 
T_sword16 SoundPlayByNumber (T_word16 num, T_word16 volume)
 
T_sword16 SoundPlayByNumberWithCallback (T_word16 num, T_word16 volume, T_soundDoneCallback callback, T_void *p_data)
 
T_sword16 SoundPlayByNumberWithDetails (T_word16 num, T_word16 volume, T_word16 frequency, T_word16 bits, E_Boolean isStereo)
 
T_sword16 SoundPlayLoopByNumber (T_word16 soundNum, T_word16 volume)
 
T_sword16 SoundPlayLoopByNumberWithCallback (T_word16 num, T_word16 volume, T_soundDoneCallback callback, T_void *p_data)
 
T_void SoundSetAllowFreqShift (E_Boolean newAllow)
 
T_void SoundSetBackgroundMusic (T_byte8 *filename)
 
T_void SoundSetBackgroundVolume (T_byte8 volume)
 
T_void SoundSetEffectsVolume (T_word16 volume)
 
T_void SoundSetStereoPanLocation (T_word16 bufferId, T_word16 panLocation)
 
T_void SoundSetVolume (T_word16 bufferId, T_word16 volume)
 
T_void SoundStop (T_word16 bufferId)
 
T_void SoundStopAllSounds (T_void)
 
T_void SoundStopBackgroundMusic (T_void)
 
T_void SoundUpdate (T_void)
 
T_void SoundUpdateOften (T_void)
 

Variables

SDL_AudioSpec G_audioSpec
 
T_word16 G_numSoundsPlaying = 0
 
T_soundBuffer G_soundBufferArray [MAX_SOUND_CHANNELS]
 

Detailed Description

Sound System.

Routines for playing sounds and looping them.

See Also
http://www.amuletsandarmor.com/AALicense.txt

Macro Definition Documentation

#define _PAN_CENTER   0x00008000
#define _PAN_LEFT   0x00000000
#define _PAN_RIGHT   0x0000ffff
#define ICheckLists ( )
#define SOUND_STREAM_NUM_SAMPLES   1024

Function Documentation

T_void SoundFinish ( T_void  )
E_Boolean SoundGetAllowFreqShift ( T_void  )
T_byte8 SoundGetBackgroundVolume ( T_void  )
T_word16 SoundGetEffectsVolume ( T_void  )

SoundGetEffectsVolume gets the volume of the sound effects.

Returns
Level of sound
T_void SoundInitialize ( T_void  )
E_Boolean SoundIsDone ( T_word16  bufferId)
E_Boolean SoundIsOn ( T_void  )

SoundIsOn checks to see if the sound system is enabled and returns this fact.

Returns
TRUE if sound is enabled, FALSE if not
T_sword16 SoundPlayByName ( const char *  filename,
T_word16  volume 
)
T_sword16 SoundPlayByNameWithDetails ( T_byte8 filename,
T_word16  volume,
T_word16  frequency,
T_word16  bits,
E_Boolean  isStereo 
)
T_sword16 SoundPlayByNumber ( T_word16  num,
T_word16  volume 
)
T_sword16 SoundPlayByNumberWithCallback ( T_word16  num,
T_word16  volume,
T_soundDoneCallback  callback,
T_void p_data 
)
T_sword16 SoundPlayByNumberWithDetails ( T_word16  num,
T_word16  volume,
T_word16  frequency,
T_word16  bits,
E_Boolean  isStereo 
)
T_sword16 SoundPlayLoopByNumber ( T_word16  soundNum,
T_word16  volume 
)
T_sword16 SoundPlayLoopByNumberWithCallback ( T_word16  num,
T_word16  volume,
T_soundDoneCallback  callback,
T_void p_data 
)
T_void SoundSetAllowFreqShift ( E_Boolean  newAllow)
T_void SoundSetBackgroundMusic ( T_byte8 filename)
T_void SoundSetBackgroundVolume ( T_byte8  volume)
T_void SoundSetEffectsVolume ( T_word16  volume)
T_void SoundSetStereoPanLocation ( T_word16  bufferId,
T_word16  panLocation 
)
T_void SoundSetVolume ( T_word16  bufferId,
T_word16  volume 
)
T_void SoundStop ( T_word16  bufferId)
T_void SoundStopAllSounds ( T_void  )

SoundStopAllSounds turns off all the sounds being played in digital form. The music is not affected.

T_void SoundStopBackgroundMusic ( T_void  )
T_void SoundUpdate ( T_void  )
T_void SoundUpdateOften ( T_void  )

Variable Documentation

SDL_AudioSpec G_audioSpec
T_word16 G_numSoundsPlaying = 0
T_soundBuffer G_soundBufferArray[MAX_SOUND_CHANNELS]