Fix JS audioContext parameters.
Were not passed along correctly. `latencyHint` is supposed to be in seconds, not milliseconds.
This commit is contained in:
parent
fee9742b59
commit
57bdb4cc35
1 changed files with 2 additions and 2 deletions
|
@ -70,14 +70,14 @@ Error AudioDriverJavaScript::init() {
|
|||
/* clang-format off */
|
||||
_driver_id = EM_ASM_INT({
|
||||
const MIX_RATE = $0;
|
||||
const LATENCY = $1;
|
||||
const LATENCY = $1 / 1000;
|
||||
return Module.IDHandler.add({
|
||||
'context': new (window.AudioContext || window.webkitAudioContext)({ sampleRate: MIX_RATE, latencyHint: LATENCY}),
|
||||
'input': null,
|
||||
'stream': null,
|
||||
'script': null
|
||||
});
|
||||
});
|
||||
}, mix_rate, latency);
|
||||
/* clang-format on */
|
||||
|
||||
int channel_count = get_total_channels_by_speaker_mode(get_speaker_mode());
|
||||
|
|
Loading…
Reference in a new issue