mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-22 22:11:55 +00:00
audio: Let emscripten update device->sample_frames at device open time.
Fixes #11435.
This commit is contained in:
parent
5bfece34f9
commit
9784e10a75
3 changed files with 7 additions and 3 deletions
|
|
@ -190,6 +190,7 @@ static bool EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device)
|
|||
|
||||
// limit to native freq
|
||||
device->spec.freq = EM_ASM_INT({ return Module['SDL3'].audioContext.sampleRate; });
|
||||
device->sample_frames = SDL_GetDefaultSampleFramesFromFreq(device->spec.freq);
|
||||
|
||||
SDL_UpdatedAudioDeviceFormat(device);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue