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 PCMFuncs &funcs)
 Initialize. More...
 
virtual size_t encoded_size (size_t num_samples) const
 Calculate encoded frame size 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, packet::channel_mask_t channels)
 Encode samples. More...
 
virtual void end ()
 Finish encoding frame. More...
 

Detailed Description

PCM encoder.

Definition at line 23 of file pcm_encoder.h.

Constructor & Destructor Documentation

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

Initialize.

Member Function Documentation

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

Start encoding a new frame.

Implements roc::audio::IFrameEncoder.

virtual size_t roc::audio::PCMEncoder::encoded_size ( size_t  num_samples) const
virtual

Calculate encoded frame size for given number of samples per channel.

Implements roc::audio::IFrameEncoder.

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

Finish encoding frame.

Implements roc::audio::IFrameEncoder.

virtual size_t roc::audio::PCMEncoder::write ( const sample_t samples,
size_t  n_samples,
packet::channel_mask_t  channels 
)
virtual

Encode samples.

Implements roc::audio::IFrameEncoder.


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