emscriptenaudio: Don't force reset SDL3.audio_recording/audio_playback.

Otherwise, opening devices for recording and playback at the same time will
cause problems.
This commit is contained in:
Ryan C. Gordon
2025-12-30 15:39:12 -05:00
parent b681862f14
commit 7d66d3271b

View File

@@ -155,8 +155,12 @@ static bool EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device)
Module['SDL3'] = {};
}
var SDL3 = Module['SDL3'];
SDL3.audio_playback = {};
SDL3.audio_recording = {};
if (typeof(SDL3.audio_playback) === 'undefined') {
SDL3.audio_playback = {};
}
if (typeof(SDL3.audio_recording) === 'undefined') {
SDL3.audio_recording = {};
}
if (!SDL3.audioContext) {
if (typeof(AudioContext) !== 'undefined') {