The Battle for Wesnoth  1.19.24+dev
Classes | Namespaces | Macros | Functions
sound.hpp File Reference
#include "events.hpp"
#include "map/location.hpp"
#include "sound_tracks.hpp"
#include "sound_music_track.hpp"
#include "utils/optional_fwd.hpp"
#include <map>
#include <string>
Include dependency graph for sound.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sound::driver_status
 
class  sound::music_thinker
 
class  sound::music_muter
 

Namespaces

 sound
 Audio output for sound and music.
 

Macros

#define DISTANCE_SILENT   255
 
#define DISTANCE_NONE   0
 

Functions

std::string sound::current_driver ()
 
std::vector< std::string > sound::enumerate_drivers ()
 
bool sound::init_sound ()
 
void sound::close_sound ()
 
void sound::reset_sound ()
 
void sound::stop_music ()
 
void sound::stop_sound ()
 
void sound::stop_UI_sound ()
 
void sound::stop_bell ()
 
void sound::play_music_config (const config &music_node, bool allow_interrupt_current_track, int i)
 
void sound::commit_music_changes ()
 
void sound::play_music_once (const std::string &file)
 
void sound::empty_playlist ()
 
void sound::play_music ()
 
void sound::reposition_sound (unsigned id, unsigned int distance)
 
bool sound::is_sound_playing (int id)
 
void sound::stop_sound (unsigned id)
 
void sound::play_sound (const std::string &files, sound_tracks::type group, unsigned int repeats)
 
void sound::play_sound_positioned (const std::string &files, int repeats, unsigned int distance, unsigned int id)
 
void sound::play_bell (const std::string &files)
 
void sound::play_timer (const std::string &files, const std::chrono::milliseconds &loop_ticks, const std::chrono::milliseconds &fadein_ticks)
 
void sound::play_UI_sound (const std::string &files)
 
void sound::write_music_play_list (config &snapshot)
 
int sound::get_music_volume ()
 
int sound::get_sound_volume ()
 
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)
 
utils::optional< unsigned int > sound::get_current_track_index ()
 
std::shared_ptr< music_track > sound::get_current_track ()
 
std::shared_ptr< music_track > sound::get_previous_music_track ()
 
void sound::set_previous_track (std::shared_ptr< music_track > track)
 
unsigned int sound::get_num_tracks ()
 
void sound::remove_track (unsigned int i)
 
void sound::play_track (unsigned int i)
 
void sound::flush_cache ()
 

Macro Definition Documentation

◆ DISTANCE_NONE

#define DISTANCE_NONE   0

Definition at line 69 of file sound.hpp.

◆ DISTANCE_SILENT

#define DISTANCE_SILENT   255

Definition at line 68 of file sound.hpp.