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:
parent
719369c71b
commit
d0613a2243
|
@ -76,7 +76,7 @@ Error AudioDriverJavaScript::init() {
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
EM_ASM({
|
EM_ASM({
|
||||||
const MIX_RATE = $0;
|
const MIX_RATE = $0;
|
||||||
const LATENCY = $1;
|
const LATENCY = $1 / 1000;
|
||||||
_audioDriver_audioContext = new (window.AudioContext || window.webkitAudioContext)({ sampleRate: MIX_RATE, latencyHint: LATENCY});
|
_audioDriver_audioContext = new (window.AudioContext || window.webkitAudioContext)({ sampleRate: MIX_RATE, latencyHint: LATENCY});
|
||||||
_audioDriver_audioInput = null;
|
_audioDriver_audioInput = null;
|
||||||
_audioDriver_inputStream = null;
|
_audioDriver_inputStream = null;
|
||||||
|
|
Loading…
Reference in New Issue