audio: Fix device refcounting vs ProvidesOwnCallbackThread backends.

This commit is contained in:
Ryan C. Gordon
2023-10-16 20:17:04 -04:00
parent c6f08c2553
commit b733adb503
5 changed files with 13 additions and 4 deletions

View File

@@ -112,6 +112,8 @@ static int HAIKUAUDIO_OpenDevice(SDL_AudioDevice *device)
}
SDL_zerop(device->hidden);
RefPhysicalAudioDevice(device); // CloseDevice will always unref this through SDL_AudioThreadFinalize, even if we failed to start the thread.
// Parse the audio format and fill the Be raw audio format
media_raw_audio_format format;
SDL_zero(format);