Freeciv-3.1
|
#include "support.h"
Go to the source code of this file.
Data Structures | |
struct | audio_plugin |
Macros | |
#define | MAX_AUDIO_NAME_LEN 20 |
#define | MAX_AUDIO_DESCR_LEN 200 |
#define | MAX_ALT_AUDIO_FILES 25 |
Typedefs | |
typedef void(* | audio_finished_callback) (void) |
Enumerations | |
enum | music_usage { MU_MENU , MU_INGAME } |
Functions | |
const struct strvec * | get_soundplugin_list (const struct option *poption) |
const struct strvec * | get_soundset_list (const struct option *poption) |
const struct strvec * | get_musicset_list (const struct option *poption) |
void | audio_init (void) |
void | audio_real_init (const char *const soundspec_name, const char *const musicset_name, const char *const preferred_plugin_name) |
void | audio_add_plugin (struct audio_plugin *p) |
void | audio_shutdown (bool play_quit_tag) |
void | audio_stop (void) |
void | audio_stop_usage (void) |
void | audio_restart (const char *soundset_name, const char *musicset_name) |
void | audio_play_sound (const char *const tag, const char *const alt_tag) |
void | audio_play_music (const char *const tag, char *const alt_tag, enum music_usage usage) |
void | audio_play_track (const char *const tag, char *const alt_tag) |
double | audio_get_volume (void) |
void | audio_set_volume (double volume) |
bool | audio_select_plugin (const char *const name) |
const char * | audio_get_all_plugin_names (void) |
enum music_usage |
void audio_add_plugin | ( | struct audio_plugin * | p | ) |
Add a plugin.
Definition at line 135 of file audio.c.
Referenced by audio_none_init(), and audio_sdl_init().
const char * audio_get_all_plugin_names | ( | void | ) |
Returns a string which list all available plugins. You don't have to free the string.
Definition at line 666 of file audio.c.
Referenced by audio_select_plugin(), and client_main().
double audio_get_volume | ( | void | ) |
void audio_init | ( | void | ) |
Initialize base audio system. Note that this function is called very early at the client startup. So for example logging isn't available.
Definition at line 187 of file audio.c.
Referenced by client_main().
void audio_play_music | ( | const char *const | tag, |
char *const | alt_tag, | ||
enum music_usage | usage | ||
) |
Loop music as suggested by sound tags
Definition at line 566 of file audio.c.
Referenced by start_menu_music(), and start_style_music().
void audio_play_sound | ( | const char *const | tag, |
const char *const | alt_tag | ||
) |
Play an audio sample as suggested by sound tags
Definition at line 521 of file audio.c.
Referenced by audio_shutdown(), do_move_unit(), handle_city_info(), handle_unit_combat_info(), play_sound_for_event(), and qtg_real_output_window_append().
void audio_play_track | ( | const char *const | tag, |
char *const | alt_tag | ||
) |
Play single track as suggested by sound tags
Definition at line 577 of file audio.c.
Referenced by play_single_track().
void audio_real_init | ( | const char *const | soundset_name, |
const char *const | musicset_name, | ||
const char *const | preferred_plugin_name | ||
) |
Initialize audio system and autoselect a plugin
Definition at line 273 of file audio.c.
Referenced by audio_restart(), and client_main().
void audio_restart | ( | const char * | soundset_name, |
const char * | musicset_name | ||
) |
Switch soundset
Definition at line 369 of file audio.c.
Referenced by handle_ruleset_control(), musicset_suggestion_callback(), musicset_suggestion_response(), musicspec_reread_callback(), popup_musicset_suggestion_dialog(), popup_soundset_suggestion_dialog(), soundset_suggestion_callback(), and soundset_suggestion_response().
bool audio_select_plugin | ( | const char *const | name | ) |
Choose plugin. Returns TRUE on success, FALSE if not
Definition at line 145 of file audio.c.
Referenced by audio_real_init().
void audio_set_volume | ( | double | volume | ) |
void audio_shutdown | ( | bool | play_quit_tag | ) |
Call this at end of program only.
play_quit_tag | Play exit sound |
Definition at line 629 of file audio.c.
Referenced by audio_shutdown_atexit(), and client_exit().
void audio_stop | ( | void | ) |
Stop sound. Music should die down in a few seconds.
Definition at line 594 of file audio.c.
Referenced by audio_play_track(), audio_restart(), and audio_shutdown().
void audio_stop_usage | ( | void | ) |
Stop looping sound. Music should die down in a few seconds.
Definition at line 602 of file audio.c.
Referenced by stop_menu_music(), and stop_style_music().
Returns a static string vector of all sound plugins available on the system. This function is unfortunately similar to audio_get_all_plugin_names().