diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp index 0d4bbb359b9..70e0dbf0f76 100644 --- a/platform/javascript/audio_driver_javascript.cpp +++ b/platform/javascript/audio_driver_javascript.cpp @@ -76,7 +76,7 @@ Error AudioDriverJavaScript::init() { /* clang-format off */ EM_ASM({ const MIX_RATE = $0; - const LATENCY = $1; + const LATENCY = $1 / 1000; _audioDriver_audioContext = new (window.AudioContext || window.webkitAudioContext)({ sampleRate: MIX_RATE, latencyHint: LATENCY}); _audioDriver_audioInput = null; _audioDriver_inputStream = null;