Skip to content

Implement true low-latency Oboe audio bridge for Android - #114

Merged
winnerspiros merged 4 commits into
masterfrom
android-oboe-audio-bridge-implementation-7026345882532678343
Mar 30, 2026
Merged

Implement true low-latency Oboe audio bridge for Android#114
winnerspiros merged 4 commits into
masterfrom
android-oboe-audio-bridge-implementation-7026345882532678343

Conversation

@google-labs-jules

Copy link
Copy Markdown

Implemented a high-performance audio bridge between the BASS audio engine and Google's Oboe library. This allows the "Low-latency audio (Oboe)" setting on Android to actually route game audio through the low-latency path (AAudio/MMAP), bypassing the standard high-latency system mixer. The implementation includes a native provider callback in C++, a managed redirector using BASS decoding channels, and integration into the OsuGameAndroid lifecycle.


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

This change transforms the "Low-latency audio (Oboe)" setting from a
purely measurement-based tool into a functional audio renderer.

Key improvements:
- Modified native Oboe bridge to accept PCM data via a provider callback.
- Implemented `OboeAudioRedirector` in C# to bridge BASS and Oboe.
- Uses reflection to intercept mixed audio data from the framework's
  BASS mixers (`TrackMixer` and `SampleMixer`).
- Automatically downmixes stereo BASS output to mono for the low-latency
  Oboe stream.
- Integrated the redirector into the `OsuGameAndroid` lifecycle.

When enabled, the game now bypasses the high-latency Android system
mixer, significantly reducing audio response time for gameplay.
@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.

This change transforms the "Low-latency audio (Oboe)" setting from a
purely measurement-based tool into a functional audio renderer.

Key improvements:
- Modified native Oboe bridge to accept PCM data via a provider callback.
- Implemented `OboeAudioRedirector` in C# to bridge BASS and Oboe.
- Uses reflection to intercept mixed audio data from the framework's
  BASS mixers (`TrackMixer` and `SampleMixer`).
- Updated Oboe configuration to Stereo for high-quality game audio.
- Integrated the redirector into the `OsuGameAndroid` lifecycle.

When enabled, the game now bypasses the high-latency Android system
mixer, significantly reducing audio response time for gameplay.
This change transforms the "Low-latency audio (Oboe)" setting from a
purely measurement-based tool into a functional audio renderer.

Key improvements:
- Modified native Oboe bridge to accept PCM data via a provider callback.
- Implemented `OboeAudioRedirector` in C# to bridge BASS and Oboe.
- Uses reflection to intercept mixed audio data from the framework's
  BASS mixers (`TrackMixer` and `SampleMixer`).
- Updated Oboe configuration to Stereo for high-quality game audio.
- Integrated the redirector into the `OsuGameAndroid` lifecycle.

When enabled, the game now bypasses the high-latency Android system
mixer, significantly reducing audio response time for gameplay.
This change transforms the "Low-latency audio (Oboe)" setting from a
purely measurement-based tool into a functional audio renderer.

Key improvements:
- Modified native Oboe bridge to accept PCM data via a provider callback.
- Implemented `OboeAudioRedirector` in C# to bridge BASS and Oboe.
- Uses reflection to intercept mixed audio data from the framework's
  BASS mixers (`TrackMixer` and `SampleMixer`).
- Updated Oboe configuration to Stereo for high-quality game audio.
- Integrated the redirector into the `OsuGameAndroid` lifecycle.

When enabled, the game now bypasses the high-latency Android system
mixer, significantly reducing audio response time for gameplay.
@winnerspiros
winnerspiros merged commit bb34fd6 into master Mar 30, 2026
0 of 7 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