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

void asw::sound::play (const asw::Sample &sample, float volume=1.0F, float pan=0.0F, bool loop=false)
 Play a sample.
 
void asw::sound::playMusic (const asw::Music &sample, float volume=1.0F)
 Play a music sample.
 
void asw::sound::stopMusic ()
 Stop the currently playing music.
 
void asw::sound::fadeInMusic (const asw::Music &music, float volume, int durationMs)
 Fade in music over a duration.
 
void asw::sound::fadeOutMusic (int durationMs)
 Fade out the currently playing music.
 
void asw::sound::pauseMusic ()
 Pause the currently playing music.
 
void asw::sound::resumeMusic ()
 Resume paused music.
 
bool asw::sound::isMusicPlaying ()
 Check if music is currently playing.
 
bool asw::sound::isMusicPaused ()
 Check if music is paused.
 
void asw::sound::setMasterVolume (float volume)
 Set the master volume multiplier (affects all audio).
 
void asw::sound::setSfxVolume (float volume)
 Set the SFX volume multiplier.
 
void asw::sound::setMusicVolume (float volume)
 Set the music volume multiplier.
 
float asw::sound::getMasterVolume ()
 Get the current master volume multiplier.
 
float asw::sound::getSfxVolume ()
 Get the current SFX volume multiplier.
 
float asw::sound::getMusicVolume ()
 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.