29#include "utility/sound/audio_buffer.hpp"
31namespace utility::sound
102 void setBuffer(std::shared_ptr<AudioBuffer> buffer);
133 [[nodiscard]] uint32_t
sourceID()
const;
139 std::shared_ptr<AudioBuffer> _buffer;
154 bool _isPlaying =
false;
169 bool _looping =
false;
Central manager responsible for OpenAL initialization and audio resource management.
Represents a playable audio source managed by AudioManager.
void setPitch(float pitch)
Sets the playback pitch.
void stop()
Stops audio playback.
void setGain(float gain)
Sets the playback gain.
void setBuffer(std::shared_ptr< AudioBuffer > buffer)
Assigns an audio buffer to this source.
void play()
Starts or resumes audio playback.
void pause()
Pauses audio playback.
uint32_t sourceID() const
Returns the unique identifier of this audio source.
~AudioSource()
Destroys the audio source.
void setLooping(bool loop)
Enables or disables looping playback.