Fix JS audioContext parameters.

Were not passed along correctly.
`latencyHint` is supposed to be in seconds, not milliseconds.

(cherry picked from commit 57bdb4cc35)
This commit is contained in:
Fabio Alessandrelli 2020-05-25 15:28:27 +02:00 committed by Rémi Verschelde
parent 719369c71b
commit d0613a2243

View file

@ -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;