Skip to content

Fix Oboe compilation and implement performance optimizations - #122

Merged
winnerspiros merged 1 commit into
masterfrom
fix/android-oboe-compilation-and-optimizations-2291124556316823461
Mar 30, 2026
Merged

Fix Oboe compilation and implement performance optimizations#122
winnerspiros merged 1 commit into
masterfrom
fix/android-oboe-compilation-and-optimizations-2291124556316823461

Conversation

@google-labs-jules

Copy link
Copy Markdown

This PR fixes the compilation errors encountered during the Android build and implements several advanced performance optimizations from the Oboe main branch.

Key changes:

  • Oboe main branch: Updated CMakeLists.txt to fetch Oboe from main. This provides access to new ADPF (Android Dynamic Performance Framework) and CPU affinity APIs.
  • ADPF Integration: Added reportActualWorkDuration reporting in the audio callback. This allows the Android OS to adjust CPU frequencies based on actual audio load, reducing power consumption and improving stability.
  • LatencyTuner: Implemented dynamic buffer management. The stream now starts at a 1x burst size (minimum possible latency) and only increases the buffer if the device experiences underruns.
  • StabilizedCallback: Added Oboe's StabilizedCallback wrapper to even out callback execution times, helping the system scheduler maintain a rock-solid audio thread.
  • Hardware Sample Rate Sync: Updated the bridge and C# layer to retrieve the native hardware sample rate from AudioManager and pass it to Oboe. This ensures AAudio uses the native hardware path, eliminating "stealth" resampling latency.
  • CPU Affinity: Fixed the oboe::Process calls to correctly pin the audio thread to high-performance ("exclusive") cores.

These changes combined should significantly reduce audio latency on modern Android devices while resolving the previous build-time failures.


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

- Update Oboe to main branch in CMake
- Resolve missing symbols: DefaultClock, reportActualWorkDuration, and Process
- Implement oboe::LatencyTuner for dynamic buffer management
- Implement oboe::StabilizedCallback for reduced jitter
- Add hardware sample rate passthrough from C# to eliminate resampling latency
- Fix CPU affinity pinning for high-performance cores
@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 33f5594 into master Mar 30, 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