Slight overlay UI fix for flickering (#231)

This commit is contained in:
Jackson 2025-10-24 02:35:31 +09:00 committed by GitHub
parent 0aa86a8cbd
commit eb044d8810
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -245,7 +245,7 @@ fn run_consumer(
in_sample_rate, in_sample_rate,
WINDOW_SIZE, WINDOW_SIZE,
BUCKETS, BUCKETS,
80.0, // vocal_min_hz 400.0, // vocal_min_hz
4000.0, // vocal_max_hz 4000.0, // vocal_max_hz
); );

View file

@ -76,8 +76,8 @@ const RecordingOverlay: React.FC = () => {
className="bar" className="bar"
style={{ style={{
height: `${Math.min(20, 4 + Math.pow(v, 0.7) * 16)}px`, // Cap at 20px max height height: `${Math.min(20, 4 + Math.pow(v, 0.7) * 16)}px`, // Cap at 20px max height
transition: "height 60ms ease-out", transition: "height 60ms ease-out, opacity 120ms ease-out",
opacity: Math.max(0.4, v * 1.7), // Minimum opacity for visibility opacity: Math.max(0.2, v * 1.7), // Minimum opacity for visibility
}} }}
/> />
))} ))}