android: Optimize Oboe audio implementation for ultra-low latency - #119
Conversation
This overhaul transitions the Oboe audio path to a zero-copy "Direct Render" approach, significantly reducing latency and fixing the "crusty" sound (buffer underruns) on high-end devices like the S23 Ultra. Key changes: - Synchronized BASS initialization to the hardware sample rate (detected via Oboe). - Implemented a BASS master mixer to offload summation to native code. - Switched to zero-copy delivery: BASS now renders directly into Oboe's native memory. - Tuned hardware buffer to 2x burst for stable MMAP (Direct-to-Hardware) pathing. - Enabled ADPF (Android Dynamic Performance Framework) for improved thread priority.
|
👋 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 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 PR optimizes the Oboe audio implementation on Android to achieve ultra-low latency (<10ms) and eliminate audio artifacts ("crusty" sound) caused by buffer underruns on modern devices like the Samsung S23 Ultra.
The optimization strategy includes:
BassMixmaster mixer that renders directly into Oboe's native memory. This bypasses the C# garbage collector and P/Invoke overhead during the audio callback.PR created automatically by Jules for task 13753788320681443518 started by @winnerspiros