![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Resamples audio stream with non-integer dynamically changing factor. More...
#include <resampler_reader.h>
Public Member Functions | |
ResamplerReader (IReader &reader, core::BufferPool< sample_t > &buffer_pool, core::IAllocator &allocator, const ResamplerConfig &config, packet::channel_mask_t channels, size_t frame_size) | |
Initialize. More... | |
bool | valid () const |
Check if object is successfully constructed. More... | |
virtual void | read (Frame &) |
Read audio frame. More... | |
bool | set_scaling (float) |
Set new resample factor. More... | |
![]() | |
ListNodeData * | list_node_data () const |
Get list node data. More... | |
Resamples audio stream with non-integer dynamically changing factor.
Definition at line 31 of file resampler_reader.h.
roc::audio::ResamplerReader::ResamplerReader | ( | IReader & | reader, |
core::BufferPool< sample_t > & | buffer_pool, | ||
core::IAllocator & | allocator, | ||
const ResamplerConfig & | config, | ||
packet::channel_mask_t | channels, | ||
size_t | frame_size | ||
) |
Initialize.
Parameters
reader
specifies input audio stream used in read()buffer_pool
is used to allocate temporary buffersframe_size
is number of samples per resampler frame per audio channelchannels
is the bitmask of audio channels
|
virtual |
Read audio frame.
Implements roc::audio::IReader.
bool roc::audio::ResamplerReader::set_scaling | ( | float | ) |
Set new resample factor.
bool roc::audio::ResamplerReader::valid | ( | ) | const |
Check if object is successfully constructed.