func audioCapsuleHeight()

in HuggingSnap/Views/InputView.swift [236:244]


    func audioCapsuleHeight(for sample: Float) -> CGFloat {
        if sample >= 0 {
            // Scale the height between minHeight and maxHeight based on the sample value
            let scaledHeight = minHeight + (maxHeight - minHeight) * CGFloat(sample)
            return min(maxHeight, max(minHeight, scaledHeight))
        } else {
            return minHeight
        }
    }