Freeciv-3.2
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "capability.h"
#include "fcintl.h"
#include "log.h"
#include "mem.h"
#include "rand.h"
#include "registry.h"
#include "shared.h"
#include "string_vector.h"
#include "support.h"
#include "audio_none.h"
#include "client_main.h"
#include "music.h"
#include "options.h"
#include "audio.h"
Go to the source code of this file.
Data Structures | |
struct | mfcb_data |
Macros | |
#define | MAX_NUM_PLUGINS 2 |
#define | SNDSPEC_SUFFIX ".soundspec" |
#define | MUSICSPEC_SUFFIX ".musicspec" |
#define | SOUNDSPEC_CAPSTR "+Freeciv-3.2-soundset" |
#define | MUSICSPEC_CAPSTR "+Freeciv-3.2-musicspec" |
#define MUSICSPEC_CAPSTR "+Freeciv-3.2-musicspec" |
void audio_add_plugin | ( | struct audio_plugin * | p | ) |
Add a plugin.
Definition at line 136 of file audio.c.
Referenced by audio_none_init(), and audio_sdl_init().
Returns a string which list all available plugins. You don't have to free the string.
Definition at line 694 of file audio.c.
Referenced by audio_select_plugin(), and client_main().
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 188 of file audio.c.
Referenced by client_main().
Loop music as suggested by sound tags
Definition at line 578 of file audio.c.
Referenced by start_menu_music(), and start_style_music().
Play tag from music set
Definition at line 519 of file audio.c.
Referenced by real_audio_play_music().
void audio_play_sound | ( | const char *const | tag, |
const char *const | alt_tag, | ||
const char *const | alt_tag2 | ||
) |
Play an audio sample as suggested by sound tags
Definition at line 528 of file audio.c.
Referenced by audio_shutdown(), disconnect_from_server(), do_move_unit(), handle_city_info(), handle_player_info(), handle_unit_combat_info(), play_sound_for_event(), qtg_real_output_window_append(), and set_client_state().
|
static |
INTERNAL. Returns id (>= 0) of the tag selected for playing, 0 when there's no alternative tags, or negative value in case of error.
Definition at line 426 of file audio.c.
Referenced by audio_play_music_tag(), audio_play_sound_tag(), and music_finished_callback().
Play single track as suggested by sound tags
Definition at line 589 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 274 of file audio.c.
Referenced by audio_restart(), and client_main().
Switch soundset
Definition at line 376 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().
Choose plugin. Returns TRUE on success, FALSE if not
Definition at line 146 of file audio.c.
Referenced by audio_real_init().
Call this at end of program only.
play_quit_tag | Play exit sound |
Definition at line 657 of file audio.c.
Referenced by audio_shutdown_atexit(), and client_exit().
Stop sound. Music should die down in a few seconds.
Definition at line 622 of file audio.c.
Referenced by audio_play_track(), audio_restart(), and audio_shutdown().
Stop looping sound. Music should die down in a few seconds.
Definition at line 630 of file audio.c.
Referenced by stop_menu_music(), and stop_style_music().
Returns the filename for the given audio set. Returns NULL if set couldn't be found. Caller has to free the return value.
Definition at line 204 of file audio.c.
Referenced by audio_real_init(), and audiospec_fullname().
|
static |
Check capabilities of the audio specfile
Definition at line 239 of file audio.c.
Referenced by audio_real_init().
|
static |
Returns a static string vector of audiosets of given type available on the system by searching all data directories for files matching suffix. The list is NULL-terminated.
Definition at line 103 of file audio.c.
Referenced by get_musicset_list(), and get_soundset_list().
Returns a static string vector of all sound plugins available on the system. This function is unfortunately similar to audio_get_all_plugin_names().
|
static |
Play music, either in loop or just one track in the middle of the style music.
Definition at line 554 of file audio.c.
Referenced by audio_play_music(), and audio_play_track().
|
static |
Definition at line 58 of file audio.c.
Referenced by audio_play_track(), music_finished_callback(), and real_audio_play_music().
|
static |
Definition at line 59 of file audio.c.
Referenced by audio_play_music(), and music_finished_callback().
Definition at line 61 of file audio.c.
Referenced by audio_play_track(), and music_finished_callback().
Referenced by audio_play_tag(), and music_finished_callback().
|
static |
Definition at line 53 of file audio.c.
Referenced by audio_play_music_tag(), audio_real_init(), and audio_shutdown().
|
static |
Definition at line 56 of file audio.c.
Referenced by audio_add_plugin(), audio_get_all_plugin_names(), audio_real_init(), audio_select_plugin(), and get_soundplugin_list().
|
static |
Definition at line 55 of file audio.c.
Referenced by audio_add_plugin(), audio_get_all_plugin_names(), audio_get_volume(), audio_pause(), audio_play_tag(), audio_resume(), audio_select_plugin(), audio_set_volume(), audio_shutdown(), audio_stop(), audio_stop_usage(), and get_soundplugin_list().
|
static |
Definition at line 57 of file audio.c.
Referenced by audio_get_volume(), audio_init(), audio_pause(), audio_play_tag(), audio_resume(), audio_select_plugin(), audio_set_volume(), audio_shutdown(), audio_stop(), and audio_stop_usage().
|
static |
Definition at line 52 of file audio.c.
Referenced by audio_play_sound_tag(), audio_real_init(), and audio_shutdown().
Definition at line 60 of file audio.c.
Referenced by audio_stop_usage(), and music_finished_callback().