···11/**
22 * Croak SFX — plays a random frog croak when called.
33 * Pre-loads all 11 croak mp3s and picks one at random each time.
44+ * Respects the global sound setting.
45 */
66+77+import { getSettings } from './settings.svelte';
5869const CROAK_COUNT = 11;
710const croakPaths = Array.from({ length: CROAK_COUNT }, (_, i) => `/sfx/croak${i + 1}.mp3`);
811912/** Play a random croak sound effect. Volume is kept moderate so it's fun, not startling. */
1013export function playCroak() {
1414+ if (!getSettings().soundEnabled) return;
1115 const idx = Math.floor(Math.random() * CROAK_COUNT);
1216 const audio = new Audio(croakPaths[idx]);
1317 audio.volume = 0.4;