MOS
|
Audio streaming from *.ogg file. More...
#include <stream.hpp>
Public Member Functions | |
Stream (const std::string &path) | |
Stream (const Stream &stream)=default | |
Stream (Stream &&stream)=default | |
Stream & | operator= (const Stream &stream)=default |
Stream & | operator= (Stream &&stream)=default |
auto | read () -> std::array< short, buffer_size > |
Read a chunk of data from the stream. More... | |
auto | done () const -> bool |
Check if stream reached the end. More... | |
auto | sample_rate () const -> unsigned int |
Sample rate, eg 44100. | |
auto | channels () const -> unsigned int |
Get number of channels. More... | |
auto | duration () const -> float |
Duration in seconds. More... | |
auto | size () const -> size_t |
Size of stream in samples. More... | |
auto | seek_start () -> void |
Restart streaming. More... | |
auto | id () const -> unsigned int |
Unique id. More... | |
Static Public Attributes | |
static const int | buffer_size = 4096 * 8 |
Audio streaming from *.ogg file.
auto mos::aud::Stream::channels | ( | ) | const -> unsigned int |
Get number of channels.
auto mos::aud::Stream::done | ( | ) | const -> bool |
Check if stream reached the end.
auto mos::aud::Stream::duration | ( | ) | const -> float |
Duration in seconds.
auto mos::aud::Stream::id | ( | ) | const -> unsigned int |
Unique id.
auto mos::aud::Stream::read | ( | ) | -> std::array< short, buffer_size > |
Read a chunk of data from the stream.
auto mos::aud::Stream::seek_start | ( | ) | -> void |
Restart streaming.
auto mos::aud::Stream::size | ( | ) | const -> size_t |
Size of stream in samples.