summaryrefslogtreecommitdiffstats
path: root/src/modules/module-ladspa-sink.c
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-01-07 01:25:55 +0100
committerMaarten Bosmans <mkbosmans@gmail.com>2011-01-16 02:14:41 +0100
commit8b4cb54595baeeb1d9b7d11a842ef7946e43a55a (patch)
treebc691c1539c036173a21e447b74d3d35e058839e /src/modules/module-ladspa-sink.c
parent11dbe30bfae09235307115f413fb6172df04a895 (diff)
Limit rate adjustments to small, inaudible jumps
The same logic is applied to the sample rate adjustments in module-rtp-recv, module-loopback and module-combine: - Each time an adjustment is made, the new rate can differ at most 2‰ from the old rate. Such a step is equal to 3.5 cents (a cent is 1/100th of a semitone) and as 5 cents is generally considered the smallest observable difference in pitch, this results in inaudible adjustments. - The sample rate of the stream can only differ from the rate of the corresponding sink by 25%. As these adjustments are meant to account for very small clock drifts, any large deviation from the base rate suggests something is seriously wrong. - If the calculated rate is within 20Hz of the base rate, set it to the base rate. This saves CPU because no resampling is necessary.
Diffstat (limited to 'src/modules/module-ladspa-sink.c')
0 files changed, 0 insertions, 0 deletions