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:
@@ -155,8 +155,12 @@ static bool EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device)
|
|||||||
Module['SDL3'] = {};
|
Module['SDL3'] = {};
|
||||||
}
|
}
|
||||||
var SDL3 = Module['SDL3'];
|
var SDL3 = Module['SDL3'];
|
||||||
SDL3.audio_playback = {};
|
if (typeof(SDL3.audio_playback) === 'undefined') {
|
||||||
SDL3.audio_recording = {};
|
SDL3.audio_playback = {};
|
||||||
|
}
|
||||||
|
if (typeof(SDL3.audio_recording) === 'undefined') {
|
||||||
|
SDL3.audio_recording = {};
|
||||||
|
}
|
||||||
|
|
||||||
if (!SDL3.audioContext) {
|
if (!SDL3.audioContext) {
|
||||||
if (typeof(AudioContext) !== 'undefined') {
|
if (typeof(AudioContext) !== 'undefined') {
|
||||||
|
|||||||
Reference in New Issue
Block a user