feat(audio): passing tone only during races and remove legacy audio

Adds 'Calls during a race' (default: passing tone only, like timing
systems) that drops name/personal best/leader/position calls in race
sessions; practice keeps them. Removes the legacy audio panel and
fallbacks, including its 'Sound on' switch that silently muted every
race-audio voice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
larssandandClaude Opus 5.5 committed 2026-09-30 21:47:40 +02:00
1 parent 5bfb67ea02
commit aaca5e8c63
13 files changed
+108 -205

No files matched your search

+4 -11
View File
@@ -73,12 +73,8 @@ export function renderDashboardView(deps) {
const totalPassings = Object.values(state.resultsBySession || {}).reduce((sum, x) => sum + (x?.passings?.length || 0), 0);
const backendUrl = getBackendUrl();
const decoderUrl = state.settings.wsUrl || "-";
const audioProfile =
state.settings.passingSoundMode === "name"
? t("settings.passing_sound_name")
: state.settings.passingSoundMode === "beep"
? t("settings.passing_sound_beep")
: t("settings.passing_sound_off");
const raceAudio = state.settings.raceAudio || {};
const audioProfile = raceAudio.enabled === false ? t("common.off") : raceAudio.muted ? t("audio.mute") : t("audio.enabled");
dom.view.innerHTML = `
${renderTrackLayoutBar({ state, t, escapeHtml, showNewButton: !active || isPracticeSessionType(active.type) })}
@@ -162,8 +158,8 @@ export function renderDashboardView(deps) {
</article>
<article class="dashboard-live-card">
<span>${t("dashboard.audio_profile")}</span>
<strong>${state.settings.audioEnabled ? audioProfile : t("settings.passing_sound_off")}</strong>
<small>${state.settings.finishVoiceEnabled ? t("settings.finish_voice") : "-"}</small>
<strong>${audioProfile}</strong>
<small>${t(raceAudio.raceCallouts === "full" ? "audio.race_callouts_full" : "audio.race_callouts_passing")}</small>
</article>
<article class="dashboard-live-card">
<span>${t("dashboard.schedule_drift")}</span>
@@ -228,9 +224,6 @@ export function renderDashboardView(deps) {
document.getElementById("dashboardTestAudio")?.addEventListener("click", () => {
ensureAudioContext();
playPassingBeep();
if (state.settings.finishVoiceEnabled) {
setTimeout(playFinishSiren, 220);
}
});
}