10 #ifndef AUDIO_MNGR_DEF
11 #define AUDIO_MNGR_DEF
14 #include <SDL_mixer.h>
15 #include <message_bus.hpp>
16 #include <task_manager.hpp>
24 uint8_t chunk_volume = MIX_MAX_VOLUME;
25 uint8_t music_volume = MIX_MAX_VOLUME;
28 float chunk_playback_volume_ratio = 1;
29 float music_playback_volume_ratio = 1;
35 ska::bytell_hash_map<uint16_t, Mix_Chunk *> *chunks_ptr{};
36 ska::bytell_hash_map<uint16_t, Mix_Music *> *music_ptr{};
41 void handle_messages();
45 void play_music(uint16_t arg, uint8_t volume, int8_t loops)
const;
47 void play_sound(uint16_t arg, uint8_t volume, int8_t loops)
const;
53 static void stop_music();
55 static void pause_music();
57 static void stop_channels();
59 void set_chunk_volume(uint8_t arg);
61 void set_music_volume(uint8_t arg);
63 static void update_task(
void *arg);
Tests fixture for the audio_manager.
This object is responsible for playing sounds and music.
audio_manager(task_manager &tsk_mngr, message_bus &gMessageBus)
The central messaging system of the engine. All subsystem make extensive use of it.
This class handles a small queue for messages.
The Task Manager handles all things multi-threaded in the engine.