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

PCM encoder. More...

#include <pcm_encoder.h>

Inheritance diagram for roc::audio::PcmEncoder:
Collaboration diagram for roc::audio::PcmEncoder:

Public Member Functions

 PcmEncoder (const SampleSpec &sample_spec)
 Initialize. More...
 
virtual size_t encoded_byte_count (size_t num_samples) const
 Get encoded frame size in bytes for given number of samples per channel. More...
 
virtual void begin (void *frame, size_t frame_size)
 Start encoding a new frame. More...
 
virtual size_t write (const sample_t *samples, size_t n_samples)
 Encode samples. More...
 
virtual void end ()
 Finish encoding frame. More...
 

Static Public Member Functions

static IFrameEncoderconstruct (core::IArena &arena, const SampleSpec &sample_spec)
 Construction function. More...
 

Detailed Description

PCM encoder.

Definition at line 24 of file pcm_encoder.h.

Constructor & Destructor Documentation

◆ PcmEncoder()

roc::audio::PcmEncoder::PcmEncoder ( const SampleSpec sample_spec)

Initialize.

Member Function Documentation

◆ begin()

virtual void roc::audio::PcmEncoder::begin ( void *  frame,
size_t  frame_size 
)
virtual

Start encoding a new frame.

Implements roc::audio::IFrameEncoder.

◆ construct()

static IFrameEncoder* roc::audio::PcmEncoder::construct ( core::IArena arena,
const SampleSpec sample_spec 
)
static

Construction function.

◆ encoded_byte_count()

virtual size_t roc::audio::PcmEncoder::encoded_byte_count ( size_t  num_samples) const
virtual

Get encoded frame size in bytes for given number of samples per channel.

Implements roc::audio::IFrameEncoder.

◆ end()

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

Finish encoding frame.

Implements roc::audio::IFrameEncoder.

◆ write()

virtual size_t roc::audio::PcmEncoder::write ( const sample_t samples,
size_t  n_samples 
)
virtual

Encode samples.

Implements roc::audio::IFrameEncoder.


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