Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
PCM decoder. More...
#include <pcm_decoder.h>
Public Member Functions | |
PcmDecoder (const SampleSpec &sample_spec) | |
Initialize. More... | |
virtual packet::stream_timestamp_t | position () const |
Get current stream position. More... | |
virtual packet::stream_timestamp_t | available () const |
Get number of samples available for decoding. More... | |
virtual size_t | decoded_sample_count (const void *frame_data, size_t frame_size) const |
Get number of samples per channel, that can be decoded from given frame. More... | |
virtual void | begin (packet::stream_timestamp_t frame_position, const void *frame_data, size_t frame_size) |
Start decoding a new frame. More... | |
virtual size_t | read (sample_t *samples, size_t n_samples) |
Read samples from current frame. More... | |
virtual size_t | shift (size_t n_samples) |
Shift samples from current frame. More... | |
virtual void | end () |
Finish decoding current frame. More... | |
Static Public Member Functions | |
static IFrameDecoder * | construct (core::IArena &arena, const SampleSpec &sample_spec) |
Construction function. More... | |
PCM decoder.
Definition at line 24 of file pcm_decoder.h.
roc::audio::PcmDecoder::PcmDecoder | ( | const SampleSpec & | sample_spec | ) |
Initialize.
|
virtual |
Get number of samples available for decoding.
Implements roc::audio::IFrameDecoder.
|
virtual |
Start decoding a new frame.
Implements roc::audio::IFrameDecoder.
|
static |
Construction function.
|
virtual |
Get number of samples per channel, that can be decoded from given frame.
Implements roc::audio::IFrameDecoder.
|
virtual |
Finish decoding current frame.
Implements roc::audio::IFrameDecoder.
|
virtual |
Get current stream position.
Implements roc::audio::IFrameDecoder.
|
virtual |
Read samples from current frame.
Implements roc::audio::IFrameDecoder.
|
virtual |
Shift samples from current frame.
Implements roc::audio::IFrameDecoder.