Doxybook2 Example
|
A simple audio buffer to hold PCM samples More...
#include <AudioBuffer.hpp>
Classes | |
struct | TypedAudioData |
Use this to populate the buffer. More... | |
Public Types | |
enum | Type { Type::UNKNOWN = 0, Type::INT_8 = 1 << 1, Type::INT_16 = 1 << 2, Type::INT_24 = 1 << 3, Type::INT_32 = 1 << 4, Type::FLOAT_32 = 1 << 5 } |
Different type of audio formats. More... | |
template<typename T > | |
using | AudioData = Utils::ArrayView< T > |
typedef AudioData< uint8_t > | AudioData8U |
Public Member Functions | |
AudioBuffer (const std::string &filename) | |
Constructor for Audio::AudioBuffer. More... | |
virtual | ~AudioBuffer ()=default |
Audio::AudioBuffer destructor. More... | |
void | play (AudioManager &manager) const |
Play this buffer. More... | |
void | stop (AudioManager &manager) const |
Stop this buffer playing. More... | |
void | loop (AudioManager &manager) const |
Loop this buffer forever. More... | |
void | setData (const TypedAudioData &data) |
template<size_t Size> | |
void | setDataMultiple (const TypedAudioData data[Size]) |
void | setData (const TypedAudioData data[], size_t size) |
Some deprecated function. More... | |
void | setCallback (Callback callback) |
Set the callback function. More... | |
void | setCallback2 (Callback2 callback, void *user) |
Set the callback function. More... | |
Protected Member Functions | |
float * | getData () |
Protected Attributes | |
bool | playing {false} |
Friends | |
class | AudioManager |
void | Audio::doSomething (AudioBuffer &buffer) |
A simple audio buffer to hold PCM samples
Some random bug
Some other random bug
Lorem ipsum donor
More detailed description!
using Engine::Audio::AudioBuffer::AudioData = Utils::ArrayView<T> |
typedef AudioData<uint8_t> Engine::Audio::AudioBuffer::AudioData8U |
|
strong |
|
explicit |
Constructor for Audio::AudioBuffer.
|
virtualdefault |
Audio::AudioBuffer destructor.
|
protected |
void Engine::Audio::AudioBuffer::loop | ( | AudioManager & | manager | ) | const |
Loop this buffer forever.
manager | Which manager to loop the sound with |
Exception | If this buffer is already looping |
void Engine::Audio::AudioBuffer::play | ( | AudioManager & | manager | ) | const |
Play this buffer.
manager | Which manager to play the sound with |
Exception | If this buffer is already playing |
void Engine::Audio::AudioBuffer::setCallback | ( | Callback | callback | ) |
Set the callback function.
callback | The callback function pointer |
void Engine::Audio::AudioBuffer::setCallback2 | ( | Callback2 | callback, |
void * | user | ||
) |
void Engine::Audio::AudioBuffer::setData | ( | const TypedAudioData & | data | ) |
void Engine::Audio::AudioBuffer::setData | ( | const TypedAudioData | data[], |
size_t | size | ||
) |
Some deprecated function.
|
inline |
void Engine::Audio::AudioBuffer::stop | ( | AudioManager & | manager | ) | const |
Stop this buffer playing.
manager | Which manager to stop the sound with |
Exception | If this buffer is already stopped |
|
friend |
|
friend |
|
protected |