![]() |
Crossfire Client, Trunk
|
Go to the source code of this file.
Functions | |
void | cf_play_music (const char *music_name) |
Play a music file. More... | |
void | cf_play_sound (gint8 x, gint8 y, guint8 dir, guint8 vol, guint8 type, char const sound[static 1], char const source[static 1]) |
Play a sound effect using the SDL_mixer sound system. More... | |
void | cf_snd_exit () |
int | cf_snd_init () |
Initialize sound server. More... | |
void | set_music_volume (void) |
void cf_play_music | ( | const char * | music_name | ) |
Play a music file.
name | Name of the song to play, without file paths or extensions. |
Definition at line 213 of file cfsndserv.c.
References cf_play_music_cb(), fade_time_ms, LOG(), LOG_DEBUG, music_is_different(), and music_playing.
Referenced by hide_main_client(), and MusicCmd().
void cf_play_sound | ( | gint8 | x, |
gint8 | y, | ||
guint8 | dir, | ||
guint8 | vol, | ||
guint8 | type, | ||
char const | sound[static 1], | ||
char const | source[static 1] | ||
) |
Play a sound effect using the SDL_mixer sound system.
sound | The sound to play. |
type | 0 for normal sounds, 1 for spell_sounds. |
x | Offset (assumed from player) to play sound used to determine value and left vs. right speaker balance. |
y | Offset (assumed from player) to play sound used to determine value and left vs. right speaker balance. |
Definition at line 134 of file cfsndserv.c.
References load_chunk(), LOG(), LOG_DEBUG, LOG_WARNING, and sounds.
Referenced by Sound2Cmd().
void cf_snd_exit | ( | ) |
Definition at line 229 of file cfsndserv.c.
References chunk_cache, music, and sounds.
int cf_snd_init | ( | ) |
Initialize sound server.
Initialize resource paths, load sound definitions, and ready the sound subsystem.
Definition at line 83 of file cfsndserv.c.
References chunk_cache, init_audio(), and sounds.
Referenced by init_sounds().
void set_music_volume | ( | void | ) |
Definition at line 180 of file cfsndserv.c.
References CONFIG_MUSIC_VOL, MIN, and use_config.
Referenced by cf_play_music_cb(), config_check(), and on_music_volume_changed().