Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::audio::LatencyConfig Struct Reference

Latency settings. More...

#include <latency_tuner.h>

Public Member Functions

 LatencyConfig ()
 Initialize. More...
 
void deduce_defaults (core::nanoseconds_t default_target_latency, bool is_receiver)
 Automatically fill missing settings. More...
 

Public Attributes

LatencyTunerBackend tuner_backend
 Latency tuner backend to use. More...
 
LatencyTunerProfile tuner_profile
 Latency tuner profile to use. More...
 
core::nanoseconds_t target_latency
 Target latency. More...
 
core::nanoseconds_t latency_tolerance
 Maximum allowed deviation from target latency. More...
 
core::nanoseconds_t stale_tolerance
 Maximum delay since last packet before queue is considered stalling. More...
 
core::nanoseconds_t scaling_interval
 Scaling update interval. More...
 
float scaling_tolerance
 Maximum allowed deviation of freq_coeff from 1.0. More...
 

Detailed Description

Latency settings.

Definition at line 64 of file latency_tuner.h.

Constructor & Destructor Documentation

◆ LatencyConfig()

roc::audio::LatencyConfig::LatencyConfig ( )
inline

Initialize.

Definition at line 118 of file latency_tuner.h.

Member Function Documentation

◆ deduce_defaults()

void roc::audio::LatencyConfig::deduce_defaults ( core::nanoseconds_t  default_target_latency,
bool  is_receiver 
)

Automatically fill missing settings.

Member Data Documentation

◆ latency_tolerance

core::nanoseconds_t roc::audio::LatencyConfig::latency_tolerance

Maximum allowed deviation from target latency.

Remarks
If the latency goes out of bounds, the session is terminated.
Note
If zero, default value is used if possible. Negative value is an error.

Definition at line 89 of file latency_tuner.h.

◆ scaling_interval

core::nanoseconds_t roc::audio::LatencyConfig::scaling_interval

Scaling update interval.

Remarks
How often to run FreqEstimator and update Resampler scaling.
Note
If zero, default value is used. Negative value is an error.

Definition at line 106 of file latency_tuner.h.

◆ scaling_tolerance

float roc::audio::LatencyConfig::scaling_tolerance

Maximum allowed deviation of freq_coeff from 1.0.

Remarks
If the scaling goes out of bounds, it is trimmed. For example, 0.01 allows freq_coeff values in range [0.99; 1.01].
Note
If zero, default value is used. Negative value is an error.

Definition at line 115 of file latency_tuner.h.

◆ stale_tolerance

core::nanoseconds_t roc::audio::LatencyConfig::stale_tolerance

Maximum delay since last packet before queue is considered stalling.

Remarks
If niq_stalling becomes larger than stalling_tolerance, latency tolerance checks are temporary disabled.
Note
If zero, default value is used if possible. Negative value is an error.

Definition at line 98 of file latency_tuner.h.

◆ target_latency

core::nanoseconds_t roc::audio::LatencyConfig::target_latency

Target latency.

Remarks
Latency tuner will try to keep latency close to this value.
Note
If zero, default value is used if possible. Negative value is an error.

Definition at line 81 of file latency_tuner.h.

◆ tuner_backend

LatencyTunerBackend roc::audio::LatencyConfig::tuner_backend

Latency tuner backend to use.

Remarks
Defines which latency to monitor & tune.

Definition at line 68 of file latency_tuner.h.

◆ tuner_profile

LatencyTunerProfile roc::audio::LatencyConfig::tuner_profile

Latency tuner profile to use.

Remarks
Defines how smooth is the tuning.

Definition at line 73 of file latency_tuner.h.


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