android: Resolve Oboe audio implementation and improve diagnostics - #146
Conversation
This overhaul fixes the non-functional Oboe implementation on Android by prioritizing reliability, visibility, and resilience without compromising low-latency performance. Key changes: - Native Bridge: Implemented aggressive fallbacks (Exclusive -> Shared -> OpenSL ES) and increased initial buffer size to 3x burst for improved stability. - Redirection: Enhanced reflection-based BASS handle discovery with an exhaustive field search and heuristic fallback for unknown wrapper types. - Visibility: Updated the FPS counter to always display Oboe status whenever the setting is enabled, reporting initialization progress or specific error codes from the native layer. - Transparency: Added a "[No Redirect]" indicator for cases where Oboe is active but the BASS redirection failed to capture the master mixer. - Integration: Preserved all critical Android platform optimizations (RequestUnbufferedDispatch, SetSustainedPerformanceMode) and maintained thread safety for UI-bound operations. - Dynamic Sync: Bound the audio redirector to the framework's ActiveMixers collection to ensure new audio streams are captured immediately.
|
👋 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. |
Fixes CI failure by removing duplicate property definition in OsuGameBase. Original overhaul summary: - Native Bridge: Implemented aggressive fallbacks (Exclusive -> Shared -> OpenSL ES) and increased initial buffer size to 3x burst for improved stability. - Redirection: Enhanced reflection-based BASS handle discovery with an exhaustive field search and heuristic fallback for unknown wrapper types. - Visibility: Updated the FPS counter to always display Oboe status whenever the setting is enabled, reporting initialization progress or specific error codes from the native layer. - Integration: Preserved all critical Android platform optimizations (RequestUnbufferedDispatch, SetSustainedPerformanceMode) and maintained thread safety for UI-bound operations. - Dynamic Sync: Bound the audio redirector to the framework's ActiveMixers collection to ensure new audio streams are captured immediately.
Fixes CI syntax errors and duplicate definitions while ensuring reliability, visibility, and resilience. Key changes: - Native Bridge: Implemented aggressive fallbacks (Exclusive -> Shared -> OpenSL ES) and increased initial buffer size to 3x burst for improved stability. - Redirection: Enhanced reflection-based BASS handle discovery with an exhaustive field search and heuristic fallback for unknown wrapper types. - Visibility: Updated the FPS counter to always display Oboe status whenever the setting is enabled, reporting initialization progress or specific error codes from the native layer. - Transparency: Added a "[No Redirect]" indicator for cases where Oboe is active but the BASS redirection failed to capture the master mixer. - Integration: Preserved all critical Android platform optimizations (RequestUnbufferedDispatch, SetSustainedPerformanceMode) and maintained thread safety for UI-bound operations. - Dynamic Sync: Bound the audio redirector to the framework's ActiveMixers collection to ensure new audio streams are captured immediately. - Bugfix: Corrected syntax errors in OboeAudioBridge.cs and duplicate property in OsuGameBase.cs.
Fixes CI build failures related to missing namespaces and duplicate property definitions. Key changes: - Native Bridge: Implemented aggressive fallbacks (Exclusive -> Shared -> OpenSL ES) and increased initial buffer size to 3x burst for improved stability. - Redirection: Enhanced reflection-based BASS handle discovery with an exhaustive field search and heuristic fallback for unknown wrapper types. - Visibility: Updated the FPS counter to always display Oboe status whenever the setting is enabled, reporting initialization progress or specific error codes from the native layer. - Integration: Preserved all critical Android platform optimizations (RequestUnbufferedDispatch, SetSustainedPerformanceMode) and maintained thread safety for UI-bound operations. Corrected namespaces (Audio.Mixing, Game.Utils, etc.) for cross-platform compatibility. - Dynamic Sync: Bound the audio redirector to the framework's ActiveMixers collection to ensure new audio streams are captured immediately. - Bugfix: Corrected syntax errors and removed redundant property definitions.
Addresses CI failures and unhandled NullReferenceExceptions while ensuring proper Oboe reliability and visibility. Key changes: - Native Bridge: Implemented aggressive fallbacks (Exclusive -> Shared -> OpenSL ES) and increased initial buffer size to 3x burst for improved stability. - Redirection: Enhanced reflection-based BASS handle discovery with an exhaustive field search and heuristic fallback for unknown wrapper types. - Thread Safety: Restored Bass.CurrentDevice to 1 after hijacking to prevent NullReferenceExceptions in other audio tracks (e.g. TrackBass). - Visibility: Updated the FPS counter to always display Oboe status whenever the setting is enabled, reporting initialization progress or specific error codes from the native layer. - Transparency: Added a "[No Redirect]" indicator for cases where Oboe is active but the BASS redirection failed to capture the master mixer. - Integration: Preserved all critical Android platform optimizations (RequestUnbufferedDispatch, SetSustainedPerformanceMode) and maintained thread safety for UI-bound operations. Corrected namespaces (Audio.Mixing, Game.Utils, etc.) for cross-platform compatibility. - Dynamic Sync: Bound the audio redirector to the framework's ActiveMixers collection to ensure new audio streams are captured immediately. - Bugfix: Corrected syntax errors in OboeAudioBridge.cs and duplicate property in OsuGameBase.cs.
Fixes CI ambiguous reference between Android.OS.Debug and System.Diagnostics.Debug. Key changes: - Native Bridge: Implemented aggressive fallbacks (Exclusive -> Shared -> OpenSL ES) and increased initial buffer size to 3x burst for improved stability. - Redirection: Enhanced reflection-based BASS handle discovery with an exhaustive field search and heuristic fallback for unknown wrapper types. - Thread Safety: Restored Bass.CurrentDevice to 1 after hijacking to prevent NullReferenceExceptions in other audio tracks (e.g. TrackBass). - Visibility: Updated the FPS counter to always display Oboe status whenever the setting is enabled, reporting initialization progress or specific error codes from the native layer. - Transparency: Added a "[No Redirect]" indicator for cases where Oboe is active but the BASS redirection failed to capture the master mixer. - Integration: Preserved all critical Android platform optimizations (RequestUnbufferedDispatch, SetSustainedPerformanceMode) and maintained thread safety for UI-bound operations. Corrected namespaces (Audio.Mixing, Game.Utils, etc.) for cross-platform compatibility. - Dynamic Sync: Bound the audio redirector to the framework's ActiveMixers collection to ensure new audio streams are captured immediately. - Bugfix: Resolved Ambiguous Reference in OsuGameAndroid.cs and fixed duplicate definition in OsuGameBase.cs.
This PR addresses the ongoing issues with the Oboe audio implementation on Android. It introduces a series of resilience improvements and diagnostic features to ensure that Oboe works reliably across a wide range of devices and provides clear feedback when it fails.
Highlights:
PR created automatically by Jules for task 9634658476078144659 started by @winnerspiros