feat(audio): Fix OpenAL auto detection

This commit addresses serveral bugs within the audio service where OpenAL would fail to register the output device to the mapped engine.

- Increase null safety checks for all audio backends (cubeb, sdl2, openal)
- Added failsafe for Device selection

These ensure the audio_renderer can validate calls from the OpenAL engine, Credits to Hayate Yoshida for helping Identify the issue.

Credit: Hayate Yoshida <hayate_yoshida@citron-emu.org>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-08-02 20:36:40 +10:00
parent b8039b4b2e
commit 45daff11c9
5 changed files with 323 additions and 106 deletions

View File

@@ -277,7 +277,7 @@ void CubebSink::CloseStreams() {
}
f32 CubebSink::GetDeviceVolume() const {
if (sink_streams.empty()) {
if (sink_streams.empty() || !sink_streams[0]) {
return 1.0f;
}