12 #ifndef ROC_AUDIO_IFRAME_DECODER_H_
13 #define ROC_AUDIO_IFRAME_DECODER_H_
55 size_t frame_size)
const = 0;
69 const void* frame_data,
70 size_t frame_size) = 0;
104 virtual size_t shift(
size_t n_samples) = 0;
Audio frame decoder interface.
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 packet::stream_timestamp_t position() const =0
Get decoded stream position.
virtual size_t read(sample_t *samples, size_t n_samples)=0
Read samples from current frame.
virtual packet::stream_timestamp_t available() const =0
Get number of samples available for decoding.
virtual size_t shift(size_t n_samples)=0
Shift samples from current frame.
virtual void end()=0
Finish decoding current frame.
virtual void begin(packet::stream_timestamp_t frame_position, const void *frame_data, size_t frame_size)=0
Start decoding a new frame.
float sample_t
Raw audio sample.
uint32_t stream_timestamp_t
Packet stream timestamp.
Commonly used types and functions.
Various units used in packets.