Skip to content

Commit 7e50a54

Browse files
committed
Make it possible to turn off visualizer to save resource usage
1 parent ff71b42 commit 7e50a54

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ui/visualizer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const (
2525
VisWave // braille waveform oscilloscope
2626
VisScatter // braille particle sparkle
2727
VisFlame // braille rising flame tendrils
28+
VisNone // hidden — no visualizer
2829
visCount // sentinel for cycling
2930
)
3031

@@ -87,6 +88,8 @@ func (v *Visualizer) ModeName() string {
8788
return "Scatter"
8889
case VisFlame:
8990
return "Flame"
91+
case VisNone:
92+
return "None"
9093
default:
9194
return "Bars"
9295
}
@@ -186,6 +189,8 @@ func (v *Visualizer) Render(bands [numBands]float64) string {
186189
return v.renderScatter(bands)
187190
case VisFlame:
188191
return v.renderFlame(bands)
192+
case VisNone:
193+
return ""
189194
default:
190195
return v.renderBars(bands)
191196
}

0 commit comments

Comments
 (0)