diff --git a/web/libs/editor/src/lib/AudioUltra/Visual/Renderer/WaveformRenderer.ts b/web/libs/editor/src/lib/AudioUltra/Visual/Renderer/WaveformRenderer.ts index d5decb357f78..027fbf06cada 100644 --- a/web/libs/editor/src/lib/AudioUltra/Visual/Renderer/WaveformRenderer.ts +++ b/web/libs/editor/src/lib/AudioUltra/Visual/Renderer/WaveformRenderer.ts @@ -105,7 +105,7 @@ export class WaveformRenderer implements Renderer { renderWave(context: RenderContext, channelNumber: number, layer: Layer, iStart: number, iEnd: number): boolean { const renderId = this.config.renderId; const audio = this.audio; - const height = this.config.waveHeight / (audio?.channelCount ?? 1); + const height = this.config.waveHeight; const scrollLeftPx = context.scrollLeftPx; const zoom = context.zoom; const amp = this.config.amp ?? 1; @@ -139,7 +139,7 @@ export class WaveformRenderer implements Renderer { let x = 0; const audio = this.audio; const channelCount = audio?.channelCount ?? 1; - const height = this.config.waveHeight / channelCount; + const height = this.config.waveHeight; const scrollLeftPx = context.scrollLeftPx; const dataLength = context.dataLength; this.lastWaveformRenderedScrollLeftPx = scrollLeftPx; diff --git a/web/libs/editor/src/lib/AudioUltra/Visual/Visualizer.ts b/web/libs/editor/src/lib/AudioUltra/Visual/Visualizer.ts index 0f29611bfda8..fa50ea24de55 100644 --- a/web/libs/editor/src/lib/AudioUltra/Visual/Visualizer.ts +++ b/web/libs/editor/src/lib/AudioUltra/Visual/Visualizer.ts @@ -154,7 +154,7 @@ export class Visualizer extends Events { backgroundLayer, config: { renderId: this.renderId, - waveHeight: this.waveHeight, + waveHeight: this.waveformHeight, padding: this.padding, reservedSpace: this.reservedSpace, waveColor: this.waveColor, @@ -1092,14 +1092,13 @@ export class Visualizer extends Events { if (!spectrogramLayer?.isVisible) return 0; const channelCount = this.audio?.channelCount ?? 1; - const totalAvailableHeight = this.waveHeight; if (this.splitChannels) { // Each channel gets an equal split of the spectrogram area - return totalAvailableHeight / channelCount; + return this.waveHeight / channelCount; } // Spectrogram uses the full height when not split - return totalAvailableHeight; + return this.waveHeight; } setAmp(amp: number) {