Go to the documentation of this file.
2 #include "../Utils/ArrayView.hpp"
136 void setData(
const TypedAudioData data[],
size_t size);
int(* Callback)(AudioBuffer &buffer, size_t offset)
Some callback function pointer type definition.
Definition: AudioBuffer.hpp:15
void setData(const TypedAudioData &data)
Type
Different type of audio formats.
Definition: AudioBuffer.hpp:65
AudioBuffer(const std::string &filename)
Constructor for Audio::AudioBuffer.
bool playing
Definition: AudioBuffer.hpp:158
Filesystem path utility functions.
Definition: ArrayView.hpp:11
AudioData8U buffer
Definition: AudioBuffer.hpp:97
void doSomething(AudioBuffer &buffer)
Do something with the buffer.
void setCallback(Callback callback)
Set the callback function.
Type type
Definition: AudioBuffer.hpp:98
void loop(AudioManager &manager) const
Loop this buffer forever.
void setDataMultiple(const TypedAudioData data[Size])
Definition: AudioBuffer.hpp:129
void play(AudioManager &manager) const
Play this buffer.
AudioData< uint8_t > AudioData8U
Definition: AudioBuffer.hpp:92
void setCallback2(Callback2 callback, void *user)
Set the callback function.
A simple audio buffer to hold PCM samples
Definition: AudioBuffer.hpp:60
void stop(AudioManager &manager) const
Stop this buffer playing.
Use this to populate the buffer.
Definition: AudioBuffer.hpp:96
virtual ~AudioBuffer()=default
Audio::AudioBuffer destructor.
This namespace contains all of the necessary engine components.
Definition: Asset.hpp:5
An audio manager that accepts multiple Audio::AudioBuffer instances.
Definition: AudioManager.hpp:21
int(*)(AudioBuffer &buffer, size_t offset, void *user) Callback2
Some callback function pointer type definition.
Definition: AudioBuffer.hpp:23