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;