Audaspace
1.3.0
A high level audio library.
|
This sound creates a buffer out of a reader. More...
#include <StreamBuffer.h>
Public Member Functions | |
StreamBuffer (std::shared_ptr< ISound > sound) | |
Creates the sound and reads the reader created by the sound supplied to the buffer. More... | |
StreamBuffer (std::shared_ptr< Buffer > buffer, Specs specs) | |
Creates the sound from an preexisting buffer. More... | |
std::shared_ptr< Buffer > | getBuffer () |
Returns the buffer to be streamed. More... | |
Specs | getSpecs () |
Returns the specification of the buffer. More... | |
virtual std::shared_ptr< IReader > | createReader () |
Creates a reader for playback of the sound source. More... | |
![]() | |
virtual | ~ISound () |
Destroys the sound. | |
This sound creates a buffer out of a reader.
This way normally streamed sound sources can be loaded into memory for buffered playback.
StreamBuffer::StreamBuffer | ( | std::shared_ptr< ISound > | sound | ) |
Creates the sound and reads the reader created by the sound supplied to the buffer.
sound | The sound that creates the reader for buffering. |
Exception | Thrown if the reader cannot be created. |
Creates the sound from an preexisting buffer.
buffer | The buffer to stream from. |
specs | The specification of the data in the buffer. |
Exception | Thrown if the reader cannot be created. |
|
virtual |
std::shared_ptr<Buffer> StreamBuffer::getBuffer | ( | ) |
Returns the buffer to be streamed.
Specs StreamBuffer::getSpecs | ( | ) |
Returns the specification of the buffer.