mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
emscripten audio: fix timer on capture's silence callback.
This commit is contained in:
parent
7a8e4cb019
commit
244d2dbcd5
@ -356,7 +356,7 @@ Emscripten_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
Runtime.dynCall('vi', $2, [$3]);
|
||||
};
|
||||
|
||||
SDL2.capture.silenceTimer = setTimeout(silence_callback, $1 / SDL2.audioContext.sampleRate);
|
||||
SDL2.capture.silenceTimer = setTimeout(silence_callback, ($1 / SDL2.audioContext.sampleRate) * 1000);
|
||||
|
||||
if ((navigator.mediaDevices !== undefined) && (navigator.mediaDevices.getUserMedia !== undefined)) {
|
||||
navigator.mediaDevices.getUserMedia({ audio: true, video: false }).then(have_microphone).catch(no_microphone);
|
||||
|
Loading…
Reference in New Issue
Block a user