From 4bf4afea4a7a194cdd2978dcb9057cd09c9bb50f Mon Sep 17 00:00:00 2001 From: Ryan Vogel <89211796+R44VC0RP@users.noreply.github.com> Date: Mon, 9 Nov 2026 10:55:28 -0500 Subject: [PATCH] Use media volume for in-app sound effects Replace system sonification usage, which Android links to ring volume, with media usage for the bundled foreground cues. Preserve sonification content, no audio focus, and the explicit silent/vibrate gate to match AVAudioPlayer on the iOS ambient session. Verified on FX_2: the v0.3.0 volume preview still played with media muted. The fixed track is STREAM_MUSIC, is muted at media 0, and plays at media 15 with ring 1. Vibrate still skips playback. vm.sh check :core passed. --- .../main/kotlin/ai/opencode/core/sound/SoundEffectsPlayback.kt | 3 ++- docs/parity/core.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/ai/opencode/core/sound/SoundEffectsPlayback.kt b/core/src/main/kotlin/ai/opencode/core/sound/SoundEffectsPlayback.kt index 02b4acf8e..6ec675e94 100644 --- a/core/src/main/kotlin/ai/opencode/core/sound/SoundEffectsPlayback.kt +++ b/core/src/main/kotlin/ai/opencode/core/sound/SoundEffectsPlayback.kt @@ -272,7 +272,8 @@ class BundledSoundEffectsAudio( private var current: MediaPlayer? = null private val attributes = AudioAttributes.Builder() - .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION) + // AVAudioPlayer on .ambient follows media volume; the silent switch is separate. + .setUsage(AudioAttributes.USAGE_MEDIA) .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION) .build() diff --git a/docs/parity/core.md b/docs/parity/core.md index e0c0af4c0..890db2ca1 100644 --- a/docs/parity/core.md +++ b/docs/parity/core.md @@ -49,7 +49,7 @@ Status values: `todo`, `partial: `, `done`, `n/a: