Crossfire Client, Trunk
|
Go to the source code of this file.
Functions | |
int | init_sounds () |
void | MusicCmd (const char *data, int len) |
void | Sound2Cmd (unsigned char *data, int len) |
This file contains the sound support for the GTK V2 client. It does not actually play sounds, but rather tries to run cfsndserve, which is responsible for playing sounds.
Definition in file sound.c.
int init_sounds | ( | ) |
Definition at line 26 of file sound.c.
References cf_snd_init().
Referenced by config_check(), and main().
void MusicCmd | ( | const char * | data, |
int | len | ||
) |
Parse the data contained by a music command coming from the server and pass the name along to cfsndserv as a quoted string.
data | Data provided following the music command from the server that hints what kind of music should play. NONE is an indication that music should stop playing. |
len | Length of the string describing the music to play. |
Format of the music command received in data:
music {string}
Definition at line 113 of file sound.c.
References cf_play_music(), CONFIG_SOUND, LOG(), LOG_ERROR, and use_config.
void Sound2Cmd | ( | unsigned char * | data, |
int | len | ||
) |
Parse the data contained by a sound2 command coming from the server and handle playing the specified sound. See server doc/Developers/sound for details.
data | Data provided following the sound2 command from the server. |
len | Length of the sound2 command data. |
Format of the sound2 command recieved in data:
sound2 {x}{y}{dir}{volume}{type}{len_sound}{sound}{len_source}{source} b b b b b b str b str
Definition at line 38 of file sound.c.
References cf_play_sound(), CONFIG_SOUND, LOG(), LOG_WARNING, and use_config.