Crossfire Client, Branches
R11627
|
Go to the source code of this file.
Data Structures | |
struct | Sound_Info |
Macros | |
#define | MAX_SOUNDS 1024 |
Typedefs | |
typedef struct Sound_Info | Sound_Info |
Functions | |
int | init_audio (void) |
int | init_sounds (void) |
static void | parse_sound_line (char *line, int lineno) |
void | play_sound (int soundnum, int soundtype, int x, int y) |
int | read_settings (void) |
int | SoundCmd (unsigned char *data, int len) |
char * | strdup_local (char *str) |
int | write_settings (void) |
Variables | |
char * | buffers =NULL |
Sound_Info | default_normal |
Sound_Info | default_spell |
Sound_Info | normal_sounds [MAX_SOUNDS] |
Sound_Info | spell_sounds [MAX_SOUNDS] |
#define MAX_SOUNDS 1024 |
Definition at line 8 of file common.c.
Referenced by init_sounds(), and parse_sound_line().
typedef struct Sound_Info Sound_Info |
int init_audio | ( | void | ) |
Definition at line 117 of file alsa9.c.
References ALSA9_ERROR, alsa_audio_close(), AUDIODEV, sound_settings::bit8, chunk_size, err, frequency, sound_settings::frequency, handle, params, sample_size, settings, sign, sound_settings::sign, stereo, sound_settings::stereo, and zerolevel.
Referenced by init_sounds().
int init_sounds | ( | void | ) |
Opens the audio device, and reads relevant configuration files.
Definition at line 156 of file common.c.
References sound_settings::audiodev, sound_settings::bit8, buffers, sound_settings::buffers, sound_settings::buflen, Sound_Info::data, def_sounds, Sound_Info::filename, frequency, sound_settings::frequency, init_audio(), MAX_SOUNDS, parse_sound_line(), sample_size, settings, sign, sound_settings::sign, Sound_Info::size, sounds_in_buffer, stereo, sound_settings::stereo, Sound_Info::volume, and zerolevel.
|
static |
Definition at line 39 of file common.c.
References Sound_Info::filename, MAX_SOUNDS, strdup_local(), Sound_Info::symbolic, and Sound_Info::volume.
Referenced by init_sounds().
void play_sound | ( | int | soundnum, |
int | soundtype, | ||
int | x, | ||
int | y | ||
) |
Definition at line 295 of file alsa9.c.
References sound_settings::bit8, sound_settings::buffers, buffers, sound_settings::buflen, current_buffer, Sound_Info::data, Sound_Info::filename, MAX_SOUNDS, normal_sounds, sample_size, settings, sound_settings::simultaneously, Sound_Info::size, SOUND_DECREASE, SOUND_NORMAL, SOUND_SPELL, sounds_in_buffer, spell_sounds, stereo, Sound_Info::symbolic, and Sound_Info::volume.
Referenced by SoundCmd().
int read_settings | ( | void | ) |
Definition at line 269 of file common.c.
References sound_settings::audiodev, sound_settings::bit8, sound_settings::buffers, sound_settings::buflen, CONFIG_FILE, sound_settings::frequency, settings, sound_settings::sign, sound_settings::simultaneously, sound_settings::stereo, and strdup_local().
int SoundCmd | ( | unsigned char * | data, |
int | len | ||
) |
?
data | |
len |
Definition at line 225 of file common.c.
References play_sound().
char* strdup_local | ( | char * | str | ) |
Definition at line 13 of file common.c.
Referenced by parse_sound_line(), and read_settings().
int write_settings | ( | void | ) |
Definition at line 243 of file common.c.
References sound_settings::bit8, sound_settings::buffers, sound_settings::buflen, CONFIG_FILE, sound_settings::frequency, settings, sound_settings::sign, sound_settings::simultaneously, and sound_settings::stereo.
char* buffers =NULL |
Definition at line 9 of file common.c.
Referenced by init_sounds().
Sound_Info default_normal |
Sound_Info default_spell |
Sound_Info normal_sounds[MAX_SOUNDS] |
Sound_Info spell_sounds[MAX_SOUNDS] |