Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Audio frames and audio processing. More...
Classes | |
class | BuiltinResampler |
Built-in resampler. More... | |
class | ChannelMapper |
Channel mapper. Converts between frames with specified channel masks. More... | |
class | ChannelMapperMatrix |
Contain conversation coefficients while mapping surround to surround. More... | |
class | ChannelMapperReader |
Channel mapper reader. Reads frames from nested reader and maps them to another channel mask. More... | |
struct | ChannelMapRule |
Defines multiplication coefficient for a pair of channels. More... | |
struct | ChannelMap |
Defines multiplication matrix for two channel masks. Instead of defining the whole matrix, it defines a list of pairs of output and input channel numbers and corresponding coefficients. Such representation allows more compact definition in the source code. The actual matrix is built by channel mapper at runtime. More... | |
struct | ChannelList |
Defines ordered list of channels. More... | |
class | ChannelMapperWriter |
Channel mapper writer. Reads frames from nested writer and maps them to another channel mask. More... | |
class | ChannelSet |
Channel set. Multi-word bitmask with bits corresponding to enabled channels. Meaning of each channel is defined by ChannelLayout. Order of serialized channels is defined by ChannelOrder. More... | |
class | channel_set_to_str |
Format ChannelSet to string. More... | |
class | DecimationResampler |
Decimating resampler. More... | |
class | Depacketizer |
Depacketizer. More... | |
class | Fanout |
Fanout. Duplicates audio stream to multiple output writers. More... | |
class | Frame |
Audio frame. More... | |
struct | FreqEstimatorConfig |
FreqEstimator tunable parameters. More... | |
class | FreqEstimator |
Evaluates sender's frequency to receivers's frequency ratio. More... | |
class | IFrameDecoder |
Audio frame decoder interface. More... | |
class | IFrameEncoder |
Audio frame encoder interface. More... | |
class | IFrameReader |
Frame reader interface. More... | |
class | IFrameWriter |
Frame writer interface. More... | |
class | IResampler |
Audio writer interface. More... | |
struct | LatencyMonitorConfig |
Parameters for latency monitor. More... | |
struct | LatencyMonitorMetrics |
Metrics of latency monitor. More... | |
class | LatencyMonitor |
Latency monitor. More... | |
class | Mixer |
Mixer. Mixes multiple input streams into one output stream. More... | |
class | NullWriter |
Null writer. More... | |
class | Packetizer |
Packetizer. More... | |
class | PcmDecoder |
PCM decoder. More... | |
class | PcmEncoder |
PCM encoder. More... | |
struct | PcmFormat |
PCM format description. More... | |
struct | PcmTraits |
PCM format meta-information. More... | |
class | PcmMapper |
PCM format mapper. Convert between PCM formats. More... | |
class | PoisonReader |
Poisons audio frames before reading them. More... | |
struct | ProfilerConfig |
Profiler Configuration Parameters. Controls profiling interval and duration of each circular buffer chunk. More... | |
class | Profiler |
Profiler The role of the profiler is to report the average processing speed (# of samples processed per time unit) during the last N seconds. We want to calculate the average processing speed efficiently (with O(1) complexity, without allocations, and as lightweight as possible). The problems with this are that we have variable-sized frames and SMA requires fixed-size chunks. To efficiently perform this calculation a ring buffer is employed. The idea behind the ring buffer is that each chunk of the buffer is the average speed of 10ms worth of samples. The ring buffer is initialized with fixed size (N * 1000)ms / (10ms) chunks. Within each chunk a weighted mean is used to calculate the average speed during those 10ms. Each frame will contribute a different number of samples to each chunk, the chunk speed is then weighted based on how many samples are contributed at what frame speed. As the chunks get populated the moving average is calculated. When the buffer is not entirely full the cumulative moving average algorithm is used and once the buffer is full the simple moving average algorithm is used. More... | |
class | ProfilingReader |
Profiling reader. More... | |
class | ProfilingWriter |
Profiling writer. More... | |
class | ResamplerMap |
Factory class for IResampler objects, according to the ResamplerBackend input. More... | |
class | ResamplerReader |
Resampler element for reading pipeline. More... | |
class | ResamplerWriter |
Resampler element for writing pipeline. More... | |
class | SampleSpec |
Sample specification. Describes sample rate and channels. More... | |
class | sample_spec_to_str |
Format SampleSpec to string. More... | |
class | SpeexResampler |
Speex resampler. More... | |
struct | WatchdogConfig |
Watchdog parameters. More... | |
class | Watchdog |
Watchdog. More... | |
Typedefs | |
typedef uint32_t | ChannelMask |
Channel mask. More... | |
typedef float | sample_t |
Audio sample. More... | |
Functions | |
const char * | channel_layout_to_str (ChannelLayout) |
Get string name of channel layout. More... | |
const char * | channel_order_to_str (ChannelOrder) |
Get string name of channel order. More... | |
const char * | channel_position_to_str (ChannelPosition) |
Get string name of channel position. More... | |
void | format_channel_set (const ChannelSet &ch_set, core::StringBuilder &bld) |
Format ChannelSet to string. More... | |
const char * | fe_profile_to_str (FreqEstimatorProfile profile) |
Get string name of FreqEstimator profile. More... | |
const char * | pcm_format_to_str (const PcmFormat &fmt) |
Get string name of PCM format. More... | |
ROC_ATTR_NODISCARD bool | pcm_format_parse (const char *str, PcmFormat &fmt) |
Parse PCM format from string name. More... | |
PcmTraits | pcm_format_traits (const PcmFormat &fmt) |
Get traits for PCM format. More... | |
const char * | resampler_backend_to_str (ResamplerBackend) |
Get string name of resampler backend. More... | |
Variables | |
const size_t | chan_map_count = 40 |
Number of defined channel mappings. More... | |
const ChannelMap | chan_maps [chan_map_count] |
Defines list of mappings between all supported surround channel mask pairs. Channel mapper will search for appropriate mapping in this list, based on input and output channel masks. More... | |
const ChannelList | chan_orders [ChanOrder_Max] |
Defines mapping of channel order identifier to list of channel positions in corresponding order. More... | |
const double | fe_decim_h [fe_decim_len] |
Impulse response of decimation filter with factor of 10. More... | |
const double | fe_decim_h_gain |
Filters gain, sum(fe_decim_h). More... | |
const PcmFormat | SampleFormat |
Sample format description. More... | |
const sample_t | SampleMin |
Minimum possible value of a sample. More... | |
const sample_t | SampleMax |
Maximum possible value of a sample. More... | |
Audio frames and audio processing.
typedef uint32_t roc::audio::ChannelMask |
Channel mask.
Definition at line 144 of file channel_defs.h.
typedef float roc::audio::sample_t |
Channel layout. Defines meaning of channels in ChannelSet. ChannelMapper uses channel layout to decide how to perform mapping.
Enumerator | |
---|---|
ChanLayout_None | Channel layout is not set.
|
ChanLayout_Surround | Multi-channel mono / stereo / surround sound.
|
ChanLayout_Multitrack | Multi-channel multi-track sound.
|
Definition at line 23 of file channel_defs.h.
Surround channel order.
Enumerator | |
---|---|
ChanOrder_None | Channel order is not set.
|
ChanOrder_Smpte | ITU/SMPTE channel order. Order: FL, FR, FC, LFE, BL, BR, BC, SL, SR, TFL, TFR, TBL, TBR, TML, TMR.
|
ChanOrder_Alsa | ALSA channel order. Order: FL, FR, BL, BR, FC, LFE, SL, SR, BC.
|
ChanOrder_Max | Maximum value of enum. |
Definition at line 49 of file channel_defs.h.
Surround channel position.
Definition at line 86 of file channel_defs.h.
FreqEstimator paremeter preset.
Definition at line 24 of file freq_estimator.h.
enum roc::audio::PcmCode |
PCM sample binary code.
Definition at line 22 of file pcm_format.h.
PCM sample endianess.
Enumerator | |
---|---|
PcmEndian_Native | Endian native to current CPU. |
PcmEndian_Big | Big endian. |
PcmEndian_Little | Little endian. |
Definition at line 54 of file pcm_format.h.
Resampler backends.
Definition at line 19 of file resampler_backend.h.
Resampler parameters presets.
Enumerator | |
---|---|
ResamplerProfile_Low | Low quality, fast speed. |
ResamplerProfile_Medium | Medium quality, medium speed. |
ResamplerProfile_High | Hight quality, low speed. |
Definition at line 19 of file resampler_profile.h.
const char* roc::audio::channel_layout_to_str | ( | ChannelLayout | ) |
Get string name of channel layout.
const char* roc::audio::channel_order_to_str | ( | ChannelOrder | ) |
Get string name of channel order.
const char* roc::audio::channel_position_to_str | ( | ChannelPosition | ) |
Get string name of channel position.
const char* roc::audio::fe_profile_to_str | ( | FreqEstimatorProfile | profile | ) |
Get string name of FreqEstimator profile.
void roc::audio::format_channel_set | ( | const ChannelSet & | ch_set, |
core::StringBuilder & | bld | ||
) |
Format ChannelSet to string.
ROC_ATTR_NODISCARD bool roc::audio::pcm_format_parse | ( | const char * | str, |
PcmFormat & | fmt | ||
) |
Parse PCM format from string name.
const char* roc::audio::pcm_format_to_str | ( | const PcmFormat & | fmt | ) |
Get string name of PCM format.
const char* roc::audio::resampler_backend_to_str | ( | ResamplerBackend | ) |
Get string name of resampler backend.
const size_t roc::audio::chan_map_count = 40 |
Number of defined channel mappings.
Definition at line 50 of file channel_mapper_table.h.
|
extern |
Defines list of mappings between all supported surround channel mask pairs. Channel mapper will search for appropriate mapping in this list, based on input and output channel masks.
|
extern |
Defines mapping of channel order identifier to list of channel positions in corresponding order.
|
extern |
Impulse response of decimation filter with factor of 10.
|
extern |
Filters gain, sum(fe_decim_h).
|
extern |
Sample format description.
|
extern |
Maximum possible value of a sample.
|
extern |
Minimum possible value of a sample.