#include "global.hpp"#include "config.hpp"#include "filesystem.hpp"#include "foreach.hpp"#include "game_preferences.hpp"#include "log.hpp"#include "serialization/string_utils.hpp"#include "sound.hpp"#include "sound_music_track.hpp"#include "util.hpp"#include "SDL_mixer.h"#include <list>
Go to the source code of this file.
Classes | |
| struct | sound::chunk_load_exception |
Namespaces | |
| namespace | sound |
Audio output for sound and music. | |
Defines | |
| #define | LOG_AUDIO LOG_STREAM(info, log_audio) |
| #define | ERR_AUDIO LOG_STREAM(err, log_audio) |
Functions | |
| static void | sound::play_sound_internal (const std::string &files, channel_group group, unsigned int repeats=0, unsigned int distance=0, int id=-1, int loop_ticks=0, int fadein_ticks=0) |
| static void | increment_chunk_usage (Mix_Chunk *mcp) |
| static void | decrement_chunk_usage (Mix_Chunk *mcp) |
| static bool | track_ok (const std::string &id) |
| static const sound::music_track & | choose_track () |
| static std::string | pick_one (const std::string &files) |
| static void | sound::channel_finished_hook (int channel) |
| bool | sound::init_sound () |
| void | sound::close_sound () |
| void | sound::reset_sound () |
| void | sound::stop_music () |
| void | sound::stop_sound () |
| void | sound::stop_bell () |
| void | sound::stop_UI_sound () |
| void | sound::play_music_once (const std::string &file) |
| void | sound::empty_playlist () |
| void | sound::play_music () |
| static void | sound::play_new_music () |
| void | sound::play_music_repeatedly (const std::string &id) |
| void | sound::play_music_config (const config &music_node) |
| void | sound::commit_music_changes () |
| void | sound::write_music_play_list (config &snapshot) |
| void | sound::reposition_sound (int id, unsigned int distance) |
| bool | sound::is_sound_playing (int id) |
| void | sound::stop_sound (int id) |
| void | sound::play_sound_positioned (const std::string &files, int id, int repeats, unsigned int distance) |
| static Mix_Chunk * | sound::load_chunk (const std::string &file, channel_group group) |
| void | sound::play_sound (const std::string &files, channel_group group, unsigned int repeats) |
| void | sound::play_bell (const std::string &files) |
| void | sound::play_timer (const std::string &files, int loop_ticks, int fadein_ticks) |
| void | sound::play_UI_sound (const std::string &files) |
| void | sound::set_music_volume (int vol) |
| void | sound::set_sound_volume (int vol) |
| void | sound::set_bell_volume (int vol) |
| void | sound::set_UI_volume (int vol) |
Variables | |
| static lg::log_domain | log_audio ("audio") |
| std::vector< Mix_Chunk * > | sound::channel_chunks |
| std::vector< int > | sound::channel_ids |
| #define ERR_AUDIO LOG_STREAM(err, log_audio) |
Definition at line 34 of file sound.cpp.
Referenced by sound::load_chunk(), sound::play_new_music(), and sound::play_sound_internal().
| #define LOG_AUDIO LOG_STREAM(info, log_audio) |
Definition at line 33 of file sound.cpp.
Referenced by sound::load_chunk(), sound::play_new_music(), sound::play_sound_internal(), and track_ok().
| static const sound::music_track& choose_track | ( | ) | [static] |
Definition at line 221 of file sound.cpp.
References track_ok().
Referenced by sound::music_thinker::process().


| static void decrement_chunk_usage | ( | Mix_Chunk * | mcp | ) | [static] |
| static void increment_chunk_usage | ( | Mix_Chunk * | mcp | ) | [static] |
| static std::string pick_one | ( | const std::string & | files | ) | [static] |
Definition at line 238 of file sound.cpp.
References utils::split().
Referenced by sound::play_sound_internal().


| static bool track_ok | ( | const std::string & | id | ) | [static] |
Definition at line 164 of file sound.cpp.
References LOG_AUDIO.
Referenced by choose_track().

lg::log_domain log_audio("audio") [static] |
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:10:19 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |