Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::audio::PCMDecoder Class Reference

PCM decoder. More...

#include <pcm_decoder.h>

Inheritance diagram for roc::audio::PCMDecoder:
Collaboration diagram for roc::audio::PCMDecoder:

Public Member Functions

 PCMDecoder (const PCMFuncs &funcs)
 Initialize. More...
 
virtual packet::timestamp_t position () const
 Get current stream position. More...
 
virtual packet::timestamp_t available () const
 Get number of samples available for decoding. More...
 
virtual void begin (packet::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, packet::channel_mask_t channels)
 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...
 

Detailed Description

PCM decoder.

Definition at line 23 of file pcm_decoder.h.

Constructor & Destructor Documentation

roc::audio::PCMDecoder::PCMDecoder ( const PCMFuncs funcs)
explicit

Initialize.

Member Function Documentation

virtual packet::timestamp_t roc::audio::PCMDecoder::available ( ) const
virtual

Get number of samples available for decoding.

Implements roc::audio::IFrameDecoder.

virtual void roc::audio::PCMDecoder::begin ( packet::timestamp_t  frame_position,
const void *  frame_data,
size_t  frame_size 
)
virtual

Start decoding a new frame.

Implements roc::audio::IFrameDecoder.

virtual void roc::audio::PCMDecoder::end ( )
virtual

Finish decoding current frame.

Implements roc::audio::IFrameDecoder.

virtual packet::timestamp_t roc::audio::PCMDecoder::position ( ) const
virtual

Get current stream position.

Implements roc::audio::IFrameDecoder.

virtual size_t roc::audio::PCMDecoder::read ( sample_t samples,
size_t  n_samples,
packet::channel_mask_t  channels 
)
virtual

Read samples from current frame.

Implements roc::audio::IFrameDecoder.

virtual size_t roc::audio::PCMDecoder::shift ( size_t  n_samples)
virtual

Shift samples from current frame.

Implements roc::audio::IFrameDecoder.


The documentation for this class was generated from the following file: