41void play(
const asw::Sample& sample,
float volume = 1.0F,
float pan = 0.5F,
bool loop =
false);
bool is_music_paused()
Check if music is paused.
void pause_music()
Pause the currently playing music.
float get_master_volume()
Get the current master volume multiplier.
void play_music(const asw::Music &sample, float volume=1.0F, float fade_in_s=0.0F)
Play a music sample.
bool is_music_playing()
Check if music is currently playing.
void set_sfx_volume(float volume)
Set the SFX volume multiplier.
float get_music_volume()
Get the current music volume multiplier.
void resume_music()
Resume paused music.
void _shutdown()
Shut down the sound module. Called automatically by asw::core::shutdown().
MIX_Mixer * get_mixer()
Get the SDL mixer device.
float get_sfx_volume()
Get the current SFX volume multiplier.
void set_music_volume(float volume)
Set the music volume multiplier.
void set_master_volume(float volume)
Set the master volume multiplier (affects all audio).
void play(const asw::Sample &sample, float volume=1.0F, float pan=0.5F, bool loop=false)
Play a sample.
void stop_music(float fade_out_s=0.0F)
Stop the currently playing music.
bool _init()
Initialize the sound module. Called automatically by asw::core::init().
std::shared_ptr< MIX_Audio > Sample
Alias for a shared pointer to an MIX_Audio.
std::shared_ptr< MIX_Audio > Music
Alias for a shared pointer to an MIX_Audio.
Types used throughout the ASW library.