This sound creates a buffer out of a reader.
More...
#include <StreamBuffer.h>
|
| | StreamBuffer (std::shared_ptr< ISound > sound) |
| | Creates the sound and reads the reader created by the sound supplied to the buffer.
|
| | StreamBuffer (std::shared_ptr< Buffer > buffer, Specs specs) |
| | Creates the sound from an preexisting buffer.
|
| std::shared_ptr< Buffer > | getBuffer () |
| | Returns the buffer to be streamed.
|
| Specs | getSpecs () |
| | Returns the specification of the buffer.
|
| virtual std::shared_ptr< IReader > | createReader () |
| | Creates a reader for playback of the sound source.
|
|
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() [1/2]
| StreamBuffer::StreamBuffer |
( |
std::shared_ptr< ISound > | sound | ) |
|
Creates the sound and reads the reader created by the sound supplied to the buffer.
- Parameters
-
| sound | The sound that creates the reader for buffering. |
- Exceptions
-
| Exception | Thrown if the reader cannot be created. |
◆ StreamBuffer() [2/2]
| StreamBuffer::StreamBuffer |
( |
std::shared_ptr< Buffer > | buffer, |
|
|
Specs | specs ) |
Creates the sound from an preexisting buffer.
- Parameters
-
| buffer | The buffer to stream from. |
| specs | The specification of the data in the buffer. |
- Exceptions
-
| Exception | Thrown if the reader cannot be created. |
◆ createReader()
| virtual std::shared_ptr< IReader > StreamBuffer::createReader |
( |
| ) |
|
|
virtual |
Creates a reader for playback of the sound source.
- Returns
- A pointer to an IReader object or nullptr if there has been an error.
- Exceptions
-
| Exception | An exception may be thrown if there has been a more unexpected error during reader creation. |
Implements ISound.
◆ getBuffer()
| std::shared_ptr< Buffer > StreamBuffer::getBuffer |
( |
| ) |
|
Returns the buffer to be streamed.
- Returns
- The buffer to stream.
◆ getSpecs()
| Specs StreamBuffer::getSpecs |
( |
| ) |
|
Returns the specification of the buffer.
- Returns
- The specification of the buffer.
The documentation for this class was generated from the following file: