audio: Whoops, this stream format change is only for capture devices.
This commit is contained in:
@@ -1611,6 +1611,7 @@ int SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream **streams, int
|
|||||||
SDL_assert(!logdev->bound_streams || (logdev->bound_streams->prev_binding == NULL));
|
SDL_assert(!logdev->bound_streams || (logdev->bound_streams->prev_binding == NULL));
|
||||||
|
|
||||||
SDL_AudioDevice *device = logdev->physical_device;
|
SDL_AudioDevice *device = logdev->physical_device;
|
||||||
|
const SDL_bool iscapture = device->iscapture;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
// lock all the streams upfront, so we can verify they aren't bound elsewhere and add them all in one block, as this is intended to add everything or nothing.
|
// lock all the streams upfront, so we can verify they aren't bound elsewhere and add them all in one block, as this is intended to add everything or nothing.
|
||||||
@@ -1648,7 +1649,9 @@ int SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream **streams, int
|
|||||||
}
|
}
|
||||||
logdev->bound_streams = stream;
|
logdev->bound_streams = stream;
|
||||||
|
|
||||||
|
if (iscapture) {
|
||||||
stream->src_spec.format = logdev->postmix ? SDL_AUDIO_F32 : device->spec.format;
|
stream->src_spec.format = logdev->postmix ? SDL_AUDIO_F32 : device->spec.format;
|
||||||
|
}
|
||||||
|
|
||||||
SDL_UnlockMutex(stream->lock);
|
SDL_UnlockMutex(stream->lock);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user