Fix SDL_SetAudioStreamFormat incorrectly blocking changes on bound streams

We want to avoid changes to the end used by the device, so src for capture and dst for output
This commit is contained in:
Brick authored and Sam Lantinga committed 2024-04-15 11:47:18 -10:00
1 parent d69e6714a8
commit 449b0229eb
1 file changed
+2 -2
+2 -2
View File
@@ -558,9 +558,9 @@ int SDL_SetAudioStreamFormat(SDL_AudioStream *stream, const SDL_AudioSpec *src_s
// quietly refuse to change the format of the end currently bound to a device.
if (stream->bound_device) {
if (stream->bound_device->physical_device->iscapture) {
dst_spec = NULL;
} else {
src_spec = NULL;
} else {
dst_spec = NULL;
}
}