fix: add VUScale.spokenLevel with proper clamping and non-finite handling

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 15:27:29 +02:00
co-authored by Claude Sonnet 5.5
parent 114548f63b
commit d0f78f5165
3 changed files with 32 additions and 2 deletions
+1 -2
View File
@@ -60,8 +60,7 @@ public struct VUMeterView: View {
/// Rounded to steps of 3 VU so VoiceOver is not flooded with changes.
private var spokenValue: String {
guard isActive else { return "stil" }
let vu = (VUScale.vu(fromDbfs: levelDbfs) / 3).rounded() * 3
return "\(Int(vu)) VU"
return VUScale.spokenLevel(fromDbfs: levelDbfs)
}
// MARK: drawing (design coordinates: MeterTokens.vuWidth × vuHeight)