![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
PCM decoder. More...
#include <roc_audio/pcm_decoder.h>

Public Member Functions | |
| PcmDecoder (const SampleSpec &sample_spec) | |
| Initialize. | |
| virtual packet::stream_timestamp_t | position () const |
| Get current stream position. | |
| virtual packet::stream_timestamp_t | available () const |
| Get number of samples available for decoding. | |
| 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. | |
| virtual void | begin (packet::stream_timestamp_t frame_position, const void *frame_data, size_t frame_size) |
| Start decoding a new frame. | |
| virtual size_t | read (sample_t *samples, size_t n_samples) |
| Read samples from current frame. | |
| virtual size_t | shift (size_t n_samples) |
| Shift samples from current frame. | |
| virtual void | end () |
| Finish decoding current frame. | |
Static Public Member Functions | |
| static IFrameDecoder * | construct (core::IArena &arena, const SampleSpec &sample_spec) |
| Construction function. | |
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.
Read samples from current frame.
Implements roc::audio::IFrameDecoder.
Shift samples from current frame.
Implements roc::audio::IFrameDecoder.