Skip to content

Commit

Permalink
Some small FFTNullsoft cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
0x5066 committed Dec 23, 2024
1 parent 38dbdd2 commit df27490
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/webamp/js/components/FFTNullsoft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand All @@ -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);
Expand Down

0 comments on commit df27490

Please sign in to comment.