feat(audio): fewer personal best calls in Open Practice

On fresh packs every driver beats their best almost every lap early in
the day. No call for a driver's first 10 laps since the practice started
or was reset, at most one per driver a minute, and 0.1 s over the last
called time. Adjustable under Settings → Audio; 0 turns a rule off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
larssandandClaude Opus 5.5 committed 2026-10-19 15:40:24 +02:00
1 parent 633e0efa1f
commit cade201d5a
10 files changed
+135 -2

No files matched your search

+4
View File
@@ -85,6 +85,10 @@ export function normalizeRaceAudioSettings(value = {}) {
maxStartDelay,
perCompetitorPassingTone: source.perCompetitorPassingTone === true,
raceCallouts: source.raceCallouts === "full" ? "full" : "passing",
// Open Practice personal best calls (practice_callouts_logic.js); 0 turns a rule off.
practicePbWarmupLaps: Math.round(clamp(source.practicePbWarmupLaps, 10, 0, 30)),
practicePbCooldownSec: Math.round(clamp(source.practicePbCooldownSec, 60, 0, 600)),
practicePbMinGainMs: Math.round(clamp(source.practicePbMinGainMs, 100, 0, 2000)),
events,
templates: source.templates && typeof source.templates === "object" ? { ...source.templates } : {},
};