Commit cdc8c13b authored by Stefan Westerfeld's avatar Stefan Westerfeld

Use sync quality threshold for speed detection to minimize false positives.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 25a84753
......@@ -634,6 +634,7 @@ detect_speed (const WavData& in_data, bool print_results)
.n_steps = 40,
};
const double scan3_smooth_distance = 20;
const double speed_sync_threshold = 0.4;
// SpeedSearch::debug_range (scan1);
......@@ -688,5 +689,9 @@ detect_speed (const WavData& in_data, bool print_results)
}
printf (" %.3f\n", total);
}
return best_speed;
if (best_quality > speed_sync_threshold)
return best_speed;
else
return 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment