Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Audio frame encoder interface. More...
#include <iframe_encoder.h>
Public Member Functions | |
virtual size_t | encoded_byte_count (size_t num_samples) const =0 |
Get encoded frame size in bytes for given number of samples per channel. More... | |
virtual void | begin (void *frame_data, size_t frame_size)=0 |
Start encoding a new frame. More... | |
virtual size_t | write (const sample_t *samples, size_t n_samples)=0 |
Write samples into current frame. More... | |
virtual void | end ()=0 |
Finish encoding current frame. More... | |
Audio frame encoder interface.
Definition at line 24 of file iframe_encoder.h.
|
pure virtual |
Start encoding a new frame.
frame_data
until frame_size
bytes are written or end() is called. Implemented in roc::audio::PcmEncoder.
|
pure virtual |
Get encoded frame size in bytes for given number of samples per channel.
Implemented in roc::audio::PcmEncoder.
|
pure virtual |
Finish encoding current frame.
Implemented in roc::audio::PcmEncoder.
|
pure virtual |
Write samples into current frame.
Parameters
samples
- samples to be encodedn_samples
- number of samples to be encoded, for all channeln_samples
if the frame is full and no more samples can be written to it.Implemented in roc::audio::PcmEncoder.