summaryrefslogtreecommitdiffstats
path: root/src/modules/module-sine-source.c
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-01-07 01:25:55 +0100
committerColin Guthrie <cguthrie@mandriva.org>2011-02-25 10:34:37 +0000
commit90c5520e03bbccf6c1d9f87221d3742cc70b53ed (patch)
tree46aed8205bdf1f1266739dd6ca885e36f6983a9d /src/modules/module-sine-source.c
parent09770e577991d49cf826bdf80b0f9559f1e67820 (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-sine-source.c')
0 files changed, 0 insertions, 0 deletions