Skip to content

Fix Oboe audio silence and routing on Android - #129

Merged
winnerspiros merged 1 commit into
masterfrom
fix/oboe-audio-silence-routing-v2-11500574319049638210
Mar 31, 2026
Merged

Fix Oboe audio silence and routing on Android#129
winnerspiros merged 1 commit into
masterfrom
fix/oboe-audio-silence-routing-v2-11500574319049638210

Conversation

@google-labs-jules

Copy link
Copy Markdown

This PR fixes the "pure silence" issue encountered when enabling Oboe audio on Android (specifically tested on S23 Ultra).

The core problem was a misunderstanding of BASS's internal device management: ChannelSetDevice automatically removes a channel from any mixer it is currently a member of. The previous logic was:

  1. Create Master Mixer.
  2. Add sources to Master Mixer.
  3. Move Master Mixer to Device 0 (Silent).
  4. Move source mixers to Device 0 (Silent).

Step 4 was inadvertently detaching all sources from the master mixer created in Step 1.

The fix reorders these steps to:

  1. Initialize Device 0.
  2. Create Master Mixer on Device 0.
  3. Move source mixers to Device 0.
  4. Add source mixers to Master Mixer.

This ensures all memberships are preserved. I've also updated restoreDefaultAudio to properly move mixers back to Device 1 (Default) and re-attach them to their framework parents, which fixed the issue where disabling Oboe would also result in silence until a restart.


PR created automatically by Jules for task 11500574319049638210 started by @winnerspiros

Reordered audio initialization steps in OboeAudioRedirector.cs to ensure
that BASS source mixers are moved to the "No Sound" device (Device 0)
before being plugged into the Oboe master mixer.

BASS automatically detaches channels from mixers when their device
context is changed (via ChannelSetDevice). The previous implementation
was adding sources to the mixer and then changing their device, causing
immediate detachment and resulting in pure silence.

Additionally improved the restoration logic to correctly move mixers
back to the default device (Device 1), enabling clean toggling of the
Oboe feature without a restart.
@google-labs-jules

Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@winnerspiros
winnerspiros merged commit 6e3171e into master Mar 31, 2026
0 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant