audio: Assigning a device channel map to an audio stream was quietly failing.

Fixes #10317.
This commit is contained in:
Ryan C. Gordon
2024-07-19 20:25:23 -04:00
parent 6d39c18dd3
commit 068c785491
3 changed files with 7 additions and 3 deletions

View File

@@ -251,7 +251,7 @@ static void UpdateAudioStreamFormatsPhysical(SDL_AudioDevice *device)
// SDL_SetAudioStreamFormat does a ton of validation just to memcpy an audiospec.
SDL_LockMutex(stream->lock);
SDL_copyp(&stream->dst_spec, &spec);
SDL_SetAudioStreamOutputChannelMap(stream, device->chmap, spec.channels); // this should be fast for normal cases, though!
SetAudioStreamChannelMap(stream, &stream->dst_spec, &stream->dst_chmap, device->chmap, spec.channels, -1); // this should be fast for normal cases, though!
SDL_UnlockMutex(stream->lock);
}
}