Skip to content
Permalink
Browse files

emscripten audio: fix timer on capture's silence callback.

  • Loading branch information
icculus committed Aug 10, 2016
1 parent 7a8e4cb commit 244d2dbcd54d241cd86f3c8e78985a109be8d383
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/audio/emscripten/SDL_emscriptenaudio.c
@@ -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);

0 comments on commit 244d2db

Please sign in to comment.