|
@@ -234,6 +234,10 @@ static bool AudioDeviceCanUseSimpleCopy(SDL_AudioDevice *device)
|
|
// should hold device->lock before calling.
|
|
// should hold device->lock before calling.
|
|
static void UpdateAudioStreamFormatsPhysical(SDL_AudioDevice *device)
|
|
static void UpdateAudioStreamFormatsPhysical(SDL_AudioDevice *device)
|
|
{
|
|
{
|
|
|
|
+ if (!device) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (device->recording) { // for recording devices, we only want to move to float32 for postmix and gain, which we'll handle elsewhere.
|
|
if (device->recording) { // for recording devices, we only want to move to float32 for postmix and gain, which we'll handle elsewhere.
|
|
// we _do_ need to make sure the channel map is correct, though...
|
|
// we _do_ need to make sure the channel map is correct, though...
|
|
for (SDL_LogicalAudioDevice *logdev = device->logical_devices; logdev; logdev = logdev->next) {
|
|
for (SDL_LogicalAudioDevice *logdev = device->logical_devices; logdev; logdev = logdev->next) {
|