From 31aa82b68c8263ea2b5b1f73745180cf9576b364 Mon Sep 17 00:00:00 2001 From: duffyduck Date: Sun, 10 May 2026 15:55:51 +0200 Subject: [PATCH] debug+fix(audio): Mute-Logs + resumeSound auch in stopPlayback stoppen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit stopPlayback stoppte bisher nur currentSound, nicht resumeSound — wenn nach einem Anruf der Auto-Resume laeuft und der User Mute drueckt, bleibt der Resume-Sound weiter spielen. Plus Logs in setMuted/stopPlayback um zu sehen warum Stefans Mute beim Replay nicht greift. Co-Authored-By: Claude Opus 4.7 (1M context) --- android/src/services/audio.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/android/src/services/audio.ts b/android/src/services/audio.ts index 52b0c85..3d8c06b 100644 --- a/android/src/services/audio.ts +++ b/android/src/services/audio.ts @@ -1157,6 +1157,8 @@ class AudioService { * Interruption zurueckgenommen. */ private _pausedForCall: boolean = false; setMuted(muted: boolean): void { + console.log('[Audio] setMuted: %s (currentSound=%s pcmStreamActive=%s)', + muted, this.currentSound ? 'aktiv' : 'null', this.pcmStreamActive); this._muted = muted; if (muted) this.stopPlayback(); } @@ -1164,6 +1166,8 @@ class AudioService { /** Laufende Wiedergabe stoppen + Queue leeren */ stopPlayback(): void { + console.log('[Audio] stopPlayback: currentSound=%s queue=%d pcm=%s', + this.currentSound ? 'aktiv' : 'null', this.audioQueue.length, this.pcmStreamActive); // Foreground-Service auch stoppen — sonst bleibt die Notification haengen // wenn Wiedergabe abgebrochen wird (Anruf, Cancel, Barge-In). stopBackgroundAudio().catch(() => {}); @@ -1174,6 +1178,11 @@ class AudioService { this.currentSound.release(); this.currentSound = null; } + if (this.resumeSound) { + this.resumeSound.stop(); + this.resumeSound.release(); + this.resumeSound = null; + } if (this.preloadedSound) { this.preloadedSound.release(); this.preloadedSound = null;