From d72738a2da6ad201eef636aa4eab53316bca27bb Mon Sep 17 00:00:00 2001 From: Hawk <28853569+WebF1yin@users.noreply.github.com> Date: Sun, 22 Nov 2026 15:56:09 -0800 Subject: [PATCH] The music pauses when a wireless car ends the session, instead of playing on out of the phone's speaker Co-Authored-By: Claude Opus 5.5 --- .../src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt b/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt index 46b0e4b..40802e5 100644 --- a/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt +++ b/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt @@ -183,6 +183,9 @@ class GearslipRunner( // The car is gone, but nothing calls stop() when a wireless session drops: it waits // for the next one. Close the music channel now, so the audio capture behind it, // and the screen sharing Android shows for it, stop too (issue #43). + // Pause the music first, as stop() does: a SOOEMAKA switched off with the car, and + // the song played on, out of the phone's speaker once Gearslip gave it back. + if (!stopped && state == State.DONE) CarServices.pausePhoneMedia() if (!stopped) audioLink?.close() writer.shutdown() if (drainWriterOnExit) writer.awaitTermination(2, TimeUnit.SECONDS)