10 #ifndef TurtleBrains_AudioController_hpp
11 #define TurtleBrains_AudioController_hpp
13 #include <turtle_brains/core/tb_configuration.hpp>
14 #if defined(tb_with_audio)
16 #include <turtle_brains/core/tb_resource_handle.hpp>
17 #include <turtle_brains/core/tb_types.hpp>
35 AudioHandle InvalidAudio(
void);
47 constexpr AudioChannel InvalidChannel(
void) {
return 0; }
62 explicit AudioController(
const AudioHandle& audioHandle = InvalidAudio());
67 AudioController(
const AudioController& other);
74 ~AudioController(
void);
83 void Play(
const bool isLooping =
false);
101 void StopLooping(
void);
108 float GetPitch(
void)
const;
114 void SetPitch(
const float pitch);
121 float GetVolume(
void)
const;
129 void SetVolume(
const float volume);
138 void FadeVolumeTo(
const float desiredVolume,
const tbCore::uint32 timeInMilliseconds);
159 bool IsComplete(
void)
const;
161 friend class AudioManager;
163 AudioHandle mAudioData;
164 AudioChannel mAudioChannel;
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
Definition: tb_resource_handle.hpp:24
Bring some sound into the games created with TurtleBrains using a very simple fire and forget AudioMa...
uint32_t uint32
Unsigned integer with a size of 32 bits. Supports values from 0 to 4294967295, (2^32 - 1)...
Definition: tb_types.hpp:28
Definition: tb_application_dialog.hpp:19