From f82639dc3aef7add28489c8d8dd7854179209909 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Mon, 2 Aug 2021 11:31:01 -0700 Subject: [PATCH] Suspend AudioContext to save resources --- ts/components/GlobalAudioContext.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ts/components/GlobalAudioContext.tsx b/ts/components/GlobalAudioContext.tsx index 85f51b0ccb..0cafced7ef 100644 --- a/ts/components/GlobalAudioContext.tsx +++ b/ts/components/GlobalAudioContext.tsx @@ -27,6 +27,8 @@ export type Contents = { // `audioContext` global, however, as the browser limits the number that can be // created.) const audioContext = new AudioContext(); +audioContext.suspend(); + const waveformCache: WaveformCache = new LRU({ max: MAX_WAVEFORM_COUNT, });