Wizard Engine
2D cross-platform game engine built around SDL2
 
Loading...
Searching...
No Matches
wze::audio Class Referencefinal

Static Public Member Functions

static int8_t volume ()
 
static void set_volume (int8_t volume)
 
static std::vector< std::shared_ptr< speaker > > & speakers ()
 
static void pause ()
 
static void resume ()
 
static void stop ()
 

Detailed Description

Definition at line 34 of file audio.hpp.

Member Function Documentation

◆ volume()

int8_t wze::audio::volume ( )
staticnodiscard

Definition at line 28 of file audio.cpp.

28 {
29 return (int8_t)Mix_MasterVolume(-1);
30}

◆ set_volume()

void wze::audio::set_volume ( int8_t volume)
static

Definition at line 32 of file audio.cpp.

32 {
33 Mix_MasterVolume(volume);
34}

◆ speakers()

std::vector< std::shared_ptr< wze::speaker > > & wze::audio::speakers ( )
staticnodiscard

Definition at line 36 of file audio.cpp.

36 {
37 return _speakers;
38}

◆ pause()

void wze::audio::pause ( )
static

Definition at line 93 of file audio.cpp.

93 {
94 Mix_Pause(-1);
95}

◆ resume()

void wze::audio::resume ( )
static

Definition at line 97 of file audio.cpp.

97 {
98 Mix_Resume(-1);
99}

◆ stop()

void wze::audio::stop ( )
static

Definition at line 101 of file audio.cpp.

101 {
102 if ((bool)Mix_HaltChannel(-1)) {
103 throw exception(Mix_GetError());
104 }
105}

The documentation for this class was generated from the following files: