10#include <vorbis/vorbisfile.h>
16#ifndef ALC_OUTPUT_LIMITER_SOFT
17#define ALC_OUTPUT_LIMITER_SOFT 0x199A
22#define SOUND_REFERENCE_DISTANCE 500.
23#define SOUND_MAX_DISTANCE 25e3
28#define SOUND_PILOT_RELATIVE \
35typedef enum SoundEnv_e {
40typedef struct alInfo_s {
80int source_newRW( SDL_RWops *rw,
const char *name,
unsigned int flags );
81int source_new(
const char *filename,
unsigned int flags );
93int sound_playPos(
int sound,
double px,
double py,
double vx,
double vy );
95int sound_updatePos(
int voice,
double px,
double py,
double vx,
double vy );
102int sound_reserve(
int num );
115void sound_setAbsorption(
double value );
116int sound_env( SoundEnv_t env,
double param );
121#define RG_PREAMP_DB 0.0
122typedef struct rg_filter_param_s {
123 float rg_scale_factor;
126void rg_filter(
float **pcm,
long channels,
long samples,
void *filter_param );
132#define soundLock() SDL_mutexP( sound_lock )
133#define soundUnlock() SDL_mutexV( sound_lock )
int sound_createGroup(int size)
Creates a sound group.
double sound_getVolumeLog(void)
Gets the current sound volume (logarithmic).
int sound_al_buffer(ALuint *buf, SDL_RWops *rw, const char *name)
Loads the sound.
double sound_getLength(int sound)
Gets the length of the sound buffer.
void sound_pitchGroup(int group, double pitch)
Sets the pitch of a group.
void sound_resume(void)
Resumes all the sounds.
void rg_filter(float **pcm, long channels, long samples, void *filter_param)
This is the filter function for the decoded Ogg Vorbis stream.
void sound_resumeGroup(int group)
Resumes all the sounds in a group.
double sound_getVolume(void)
Gets the current sound volume (linear).
void sound_speedGroup(int group, int enable)
Sets whether or not the speed affects a group.
int source_newRW(SDL_RWops *rw, const char *name, unsigned int flags)
Loads a new sound source from a RWops.
int sound_updateListener(double dir, double px, double py, double vx, double vy)
Updates the sound listener.
int sound_playPos(int sound, double px, double py, double vx, double vy)
Plays a sound based on position.
int sound_playGroup(int group, int sound, int once)
Plays a sound in a group.
void sound_exit(void)
Cleans up after the sound subsytem.
void sound_stopGroup(int group)
Stops all the sounds in a group.
int sound_update(double dt)
Updates the sounds removing obsolete ones and such.
void sound_stopAll(void)
Stops all the playing voices.
int source_new(const char *filename, unsigned int flags)
Loads a new source from a file.
ov_callbacks sound_al_ovcall_noclose
int sound_init(void)
Initializes the sound subsystem.
void sound_pause(void)
Pauses all the sounds.
int sound_get(const char *name)
Gets the buffer to sound of name.
int sound_env(SoundEnv_t env_type, double param)
Sets up the sound environment.
void sound_pauseGroup(int group)
Pauses all the sounds in a group.
ALuint sound_efx_directSlot
void sound_stop(int voice)
Stops a voice from playing.
ov_callbacks sound_al_ovcall
int sound_updatePos(int voice, double px, double py, double vx, double vy)
Updates the position of a voice.
int sound_play(int sound)
Plays the sound in the first available channel.
int sound_volume(const double vol)
Sets the volume.
void sound_volumeGroup(int group, double volume)
Sets the volume of a group.
void sound_setSpeed(double s)
Sets the speed to play the sound at.