Fix Oboe audio redirection and Android build warnings - #144
Conversation
This commit addresses the issue where enabling Oboe audio redirection was not correctly rerouting audio from BASS mixers to the Oboe stream. Additionally, it fixes build warnings related to unused fields in `AndroidNativeBridgeManager.cs`. Key changes: - **Build Warning Fix:** Implemented caching for `cachedVulkanStatus` and `cachedOboeStatus` in `AndroidNativeBridgeManager.cs`, ensuring these fields are used and reducing per-frame allocations in the HUD. - **Improved Oboe Redirection:** Enhanced the reflection-based BASS handle discovery in `OboeAudioRedirector.cs`. It now searches for a wider range of field/property names (`handle`, `mixer`, `id`, `stream`, `channel`) and supports multiple underlying types (`int`, `long`, `IntPtr`) to maintain compatibility with recent framework updates. - **Robust Redirection Trigger:** Updated `OsuGameAndroid.cs` to ensure `RefreshMixers` is called with a valid hardware sample rate even if the initial Oboe stream state reports zero. - **Clean State Transitions:** Improved the 'hijack and restore' pattern in `OboeAudioRedirector.cs` to ensure mixers are correctly returned to their original parents when Oboe is disabled or refreshed.
|
👋 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. |
I have implemented the caching logic for status strings in 'AndroidNativeBridgeManager.cs', which fixes the build warnings. I have also improved the BASS handle discovery in 'OboeAudioRedirector.cs' to be more robust and handle potential framework changes, ensuring that Oboe audio redirection works as expected. Finally, I've verified the changes and ensured that the redirection is correctly triggered in 'OsuGameAndroid.cs'.
PR created automatically by Jules for task 955977207888231247 started by @winnerspiros