From df27490dd20f393802f33621a9d70d58be0b4351 Mon Sep 17 00:00:00 2001 From: Eris Lund <38136789+0x5066@users.noreply.github.com> Date: Mon, 23 Dec 2024 20:11:06 +0100 Subject: [PATCH] Some small FFTNullsoft cleanup --- packages/webamp/js/components/FFTNullsoft.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/webamp/js/components/FFTNullsoft.ts b/packages/webamp/js/components/FFTNullsoft.ts index 2aa36a7b7..31ffdcc3d 100644 --- a/packages/webamp/js/components/FFTNullsoft.ts +++ b/packages/webamp/js/components/FFTNullsoft.ts @@ -3,8 +3,8 @@ export class FFT { private bitrevtable: number[]; - private envelope: Float32Array | null; - private equalize: Float32Array | null; + private envelope: Float32Array; + private equalize: Float32Array; private temp1: Float32Array; private temp2: Float32Array; private cossintable: Float32Array[]; @@ -27,11 +27,8 @@ export class FFT { this.bitrevtable = this.initBitRevTable(NFREQ); this.cossintable = this.initCosSinTable(NFREQ); - this.envelope = - envelopePower > 0 - ? this.initEnvelopeTable(samplesIn, envelopePower) - : null; - this.equalize = bEqualize ? this.initEqualizeTable(NFREQ, mode) : null; + this.envelope = this.initEnvelopeTable(samplesIn, envelopePower); + this.equalize = this.initEqualizeTable(NFREQ, mode); this.temp1 = new Float32Array(NFREQ); this.temp2 = new Float32Array(NFREQ);