Skip to content

fix: FIT-250: SplitChannel audio with spectrogram displaying blank space on waveform #7820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class WaveformRenderer implements Renderer<WaveformRendererConfig> {
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;
Expand Down Expand Up @@ -139,7 +139,7 @@ export class WaveformRenderer implements Renderer<WaveformRendererConfig> {
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;
Expand Down
7 changes: 3 additions & 4 deletions web/libs/editor/src/lib/AudioUltra/Visual/Visualizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class Visualizer extends Events<VisualizerEvents> {
backgroundLayer,
config: {
renderId: this.renderId,
waveHeight: this.waveHeight,
waveHeight: this.waveformHeight,
padding: this.padding,
reservedSpace: this.reservedSpace,
waveColor: this.waveColor,
Expand Down Expand Up @@ -1092,14 +1092,13 @@ export class Visualizer extends Events<VisualizerEvents> {
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) {
Expand Down
Loading