12 #ifndef ROC_AUDIO_PCM_DECODER_H_
13 #define ROC_AUDIO_PCM_DECODER_H_
43 const void* frame_data,
50 virtual size_t shift(
size_t n_samples);
57 const size_t n_chans_;
62 const void* frame_data_;
63 size_t frame_byte_size_;
64 size_t frame_bit_off_;
Audio frame decoder interface.
virtual packet::stream_timestamp_t available() const
Get number of samples available for decoding.
PcmDecoder(const SampleSpec &sample_spec)
Initialize.
virtual size_t shift(size_t n_samples)
Shift samples from current frame.
virtual size_t read(sample_t *samples, size_t n_samples)
Read samples from current frame.
virtual void begin(packet::stream_timestamp_t frame_position, const void *frame_data, size_t frame_size)
Start decoding a new frame.
static IFrameDecoder * construct(core::IArena &arena, const SampleSpec &sample_spec)
Construction function.
virtual packet::stream_timestamp_t position() const
Get current stream position.
virtual void end()
Finish decoding current frame.
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.
PCM format mapper. Convert between PCM formats.
Sample specification. Describes sample rate and channels.
Base class for non-copyable objects.
Audio frame decoder interface.
float sample_t
Raw audio sample.
uint32_t stream_timestamp_t
Packet stream timestamp.