From 78c03a40b019cfbb6511adca357252dc3026f544 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Fri, 25 Sep 2020 00:39:51 +0100 Subject: [PATCH] Make consistent type output. --- src/mixer/audio.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mixer/audio.ts b/src/mixer/audio.ts index 736d722..b4e4231 100644 --- a/src/mixer/audio.ts +++ b/src/mixer/audio.ts @@ -340,7 +340,8 @@ export class AudioEngine extends ((EngineEmitter as unknown) as { this.micMixGain.gain.value = value; } - getLevels(source: LevelsSource, stereo: boolean) { + + getLevels(source: LevelsSource, stereo: boolean): [number, number] { let analysisBuffer = new Float32Array(ANALYSIS_FFT_SIZE); let analysisBuffer2 = new Float32Array(ANALYSIS_FFT_SIZE); switch (source) { @@ -397,7 +398,7 @@ export class AudioEngine extends ((EngineEmitter as unknown) as { peakR = 20 * Math.log10(peakR); return [peakL, peakR]; } - return [peakL]; + return [peakL,0]; } async playNewsEnd() {