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 class | Type { UNKNOWN = 0 , INT_8 = 1 << 1 , INT_16 = 1 << 2 , INT_24 = 1 << 3 , INT_32 = 1 << 4 , 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. | |
| virtual | ~AudioBuffer ()=default |
| Audio::AudioBuffer destructor. | |
| void | play (AudioManager &manager) const |
| Play this buffer. | |
| void | stop (AudioManager &manager) const |
| Stop this buffer playing. | |
| void | loop (AudioManager &manager) const |
| Loop this buffer forever. | |
| 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. | |
| void | setCallback (Callback callback) |
| Set the callback function. | |
| void | setCallback2 (Callback2 callback, void *user) |
| Set the callback function. | |
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 |