diff --git a/src/voice/Playback.ts b/src/voice/Playback.ts index 10e4ad6b7d..9f46530de4 100644 --- a/src/voice/Playback.ts +++ b/src/voice/Playback.ts @@ -31,6 +31,7 @@ export enum PlaybackState { } export const PLAYBACK_WAVEFORM_SAMPLES = 39; +const THUMBNAIL_WAVEFORM_SAMPLES = 100; // arbitrary: [30,120] const DEFAULT_WAVEFORM = arraySeed(0, PLAYBACK_WAVEFORM_SAMPLES); function makePlaybackWaveform(input: number[]): number[] { @@ -73,7 +74,7 @@ export class Playback extends EventEmitter implements IDestroyable { this.fileSize = this.buf.byteLength; this.context = createAudioContext(); this.resampledWaveform = arrayFastResample(seedWaveform ?? DEFAULT_WAVEFORM, PLAYBACK_WAVEFORM_SAMPLES); - this.thumbnailWaveform = arrayFastResample(seedWaveform ?? DEFAULT_WAVEFORM, 100); + this.thumbnailWaveform = arrayFastResample(seedWaveform ?? DEFAULT_WAVEFORM, THUMBNAIL_WAVEFORM_SAMPLES); this.waveformObservable.update(this.resampledWaveform); this.clock = new PlaybackClock(this.context); }