![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Resamples audio stream with non-integer dynamically changing factor. More...
#include <resampler_writer.h>
Public Member Functions | |
ResamplerWriter (IWriter &writer, 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 | write (Frame &) |
Read audio frame. More... | |
bool | set_scaling (float) |
Set new resample factor. More... | |
Resamples audio stream with non-integer dynamically changing factor.
Definition at line 31 of file resampler_writer.h.
roc::audio::ResamplerWriter::ResamplerWriter | ( | IWriter & | writer, |
core::BufferPool< sample_t > & | buffer_pool, | ||
core::IAllocator & | allocator, | ||
const ResamplerConfig & | config, | ||
packet::channel_mask_t | channels, | ||
size_t | frame_size | ||
) |
Initialize.
Parameters
writer
specifies output audio stream used in write()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 bool roc::audio::ResamplerWriter::set_scaling | ( | float | ) |
Set new resample factor.
bool roc::audio::ResamplerWriter::valid | ( | ) | const |
Check if object is successfully constructed.
|
virtual |
Read audio frame.
Implements roc::audio::IWriter.