audio: Fix postmix state when migrating to new default devices.

Otherwise buffers might not be allocated, etc.
main
Ryan C. Gordon 2023-11-15 14:10:29 -05:00
parent 078995bbe0
commit 8fa0746d4a
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 2 additions and 0 deletions

View File

@ -2065,6 +2065,8 @@ void SDL_DefaultAudioDeviceChanged(SDL_AudioDevice *new_default_device)
RefPhysicalAudioDevice(new_default_device);
UnrefPhysicalAudioDevice(current_default_device);
SDL_SetAudioPostmixCallback(logdev->instance_id, logdev->postmix, logdev->postmix_userdata);
SDL_PendingAudioDeviceEvent *p;
// Queue an event for each logical device we moved.