From 389e0b8e8ef84a0203a90768e20280a40334785c Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 7 May 2021 21:11:31 -0600 Subject: [PATCH] wrong const --- src/utils/arrays.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/arrays.ts b/src/utils/arrays.ts index 0c980c794d..56bce5b2da 100644 --- a/src/utils/arrays.ts +++ b/src/utils/arrays.ts @@ -29,7 +29,7 @@ export function arrayFastResample(input: number[], points: number): number[] { // Heavily inspired by matrix-media-repo (used with permission) // https://github.com/turt2live/matrix-media-repo/blob/abe72c87d2e29/util/util_audio/fastsample.go#L10 - let samples: number[] = []; + const samples: number[] = []; if (input.length > points) { // Danger: this loop can cause out of memory conditions if the input is too small. const everyNth = Math.round(input.length / points); @@ -60,7 +60,7 @@ export function arrayFastResample(input: number[], points: number): number[] { export function arraySmoothingResample(input: number[], points: number): number[] { if (input.length === points) return input; // short-circuit a complicated call - const samples: number[] = []; + let samples: number[] = []; if (input.length > points) { // We're downsampling. To preserve the curve we'll actually reduce our sample // selection and average some points between them.