Fix jitter test in source selection

Distance should be compared to square root of variance.
This commit is contained in:
Miroslav Lichvar 2010-12-15 14:25:40 +01:00
parent c88801065f
commit eec438a614

View file

@ -622,7 +622,7 @@ SRC_SelectSource(unsigned long match_addr)
variance */
for (i=0; i<n_sel_sources; i++) {
index = sel_sources[i];
if (sources[index]->sel_info.variance > min_distance) {
if (sqrt(sources[index]->sel_info.variance) > min_distance) {
sel_sources[i] = INVALID_SOURCE;
sources[index]->status = SRC_JITTERY;
#if 0