ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
sound.h File Reference

Sound module for the ASW library. More...

#include "./types.h"
Include dependency graph for sound.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  asw
 
namespace  asw::sound
 

Functions

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

Detailed Description

Sound module for the ASW library.

Author
Allan Legemaate (alege.nosp@m.maat.nosp@m.e@gma.nosp@m.il.c.nosp@m.om)
Date
2023-09-20

Definition in file sound.h.