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

Public Member Functions | |
| virtual packet::stream_timestamp_t | position () const =0 |
| Get decoded stream position. | |
| virtual packet::stream_timestamp_t | available () const =0 |
| Get number of samples available for decoding. | |
| virtual size_t | decoded_sample_count (const void *frame_data, size_t frame_size) const =0 |
| 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)=0 |
| Start decoding a new frame. | |
| virtual size_t | read (sample_t *samples, size_t n_samples)=0 |
| Read samples from current frame. | |
| virtual size_t | shift (size_t n_samples)=0 |
| Shift samples from current frame. | |
| virtual void | end ()=0 |
| Finish decoding current frame. | |
Audio frame decoder interface.
Definition at line 24 of file iframe_decoder.h.
|
pure virtual |
Get number of samples available for decoding.
Implemented in roc::audio::PcmDecoder.
|
pure virtual |
Start decoding a new frame.
frame_data, until frame_size bytes are read or end() is called.frame_position defines the position of the frame in the encoded stream. Decoder updates the decoded stream position according to frame_position, but not necessary to the same value. Encoded and decoded stream positions may be slightly different, depending on the codec implementation. Implemented in roc::audio::PcmDecoder.
|
pure virtual |
Get number of samples per channel that can be decoded from given frame.
Implemented in roc::audio::PcmDecoder.
|
pure virtual |
Finish decoding current frame.
Implemented in roc::audio::PcmDecoder.
|
pure virtual |
Get decoded stream position.
Implemented in roc::audio::PcmDecoder.
|
pure virtual |
Read samples from current frame.
Parameters
samples - buffer to write decoded samples ton_samples - number of samples to be decoded per channeln_samples if there are no more samples in the current frame.Implemented in roc::audio::PcmDecoder.
Shift samples from current frame.
Parameters
n_samples - number of samples to shift per channeln_samples if there are no more samples in the current frame.Implemented in roc::audio::PcmDecoder.