diff --git a/main.py b/main.py index 8877a176..04c7bf6b 100755 --- a/main.py +++ b/main.py @@ -97,7 +97,6 @@ def play_start_intro(): from multiprocessing import Process, get_start_method, set_start_method -import shutil, subprocess, tempfile, wave, math, struct import time def _call_sound(method_name: str): @@ -116,61 +115,14 @@ def _play_in_child(method_name: str) -> bool: pass return p.exitcode == 0 -def _beep_fallback(times: int = 1, pause: float = 0.2): - for _ in range(times): - print("\a", end="", flush=True) - time.sleep(pause) - -_BEEP_WAV_PATH = None -def _ensure_beep_wav(freq=880.0, dur=0.25, rate=44100): - """Erzeugt einmalig eine kleine WAV-Datei für den System-Fallback.""" - global _BEEP_WAV_PATH - if _BEEP_WAV_PATH: - return _BEEP_WAV_PATH - n = int(dur * rate) - with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f: - with wave.open(f, "wb") as w: - w.setnchannels(1); w.setsampwidth(2); w.setframerate(rate) - for i in range(n): - s = int(32767 * math.sin(2*math.pi*freq*i/rate)) - w.writeframes(struct.pack("