Skip to content

Commit

Permalink
Fix hound line length violations
Browse files Browse the repository at this point in the history
  • Loading branch information
hoopes committed Jan 16, 2024
1 parent 7e8d048 commit 62247a4
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions Sources/AudioKitUI/Visualizations/AmplitudeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ class AmplitudeModel: ObservableObject {
func updateNode(_ node: Node) {
if node !== self.node {
self.node = node
nodeTap = AmplitudeTap(node, stereoMode: stereoMode, analysisMode: analysisMode, callbackQueue: .main) { amp in
nodeTap = AmplitudeTap(
node,
stereoMode: stereoMode,
analysisMode: analysisMode,
callbackQueue: .main
) { amp in
self.pushData(amp)
}
nodeTap.start()
Expand Down Expand Up @@ -48,23 +53,40 @@ public struct AmplitudeView: View {
let numberOfSegments: Int
let fillType: FillType

public init(_ node: Node, stereoMode: StereoMode = .center, analysisMode: AnalysisMode = .peak, numberOfSegments: Int = 20) {
public init(
_ node: Node,
stereoMode: StereoMode = .center,
analysisMode: AnalysisMode = .peak,
numberOfSegments: Int = 20
) {
self.node = node
self.stereoMode = stereoMode
self.analysisMode = analysisMode
self.fillType = .gradient(gradient: Gradient(colors: [.red, .yellow, .green]))
self.numberOfSegments = numberOfSegments
}

public init(_ node: Node, color: Color, stereoMode: StereoMode = .center, analysisMode: AnalysisMode = .peak, numberOfSegments: Int = 20) {
public init(
_ node: Node,
color: Color,
stereoMode: StereoMode = .center,
analysisMode: AnalysisMode = .peak,
numberOfSegments: Int = 20
) {
self.node = node
self.stereoMode = stereoMode
self.analysisMode = analysisMode
self.fillType = .solid(color: color)
self.numberOfSegments = numberOfSegments
}

public init(_ node: Node, colors: Gradient, stereoMode: StereoMode = .center, analysisMode: AnalysisMode = .peak, numberOfSegments: Int = 20) {
public init(
_ node: Node,
colors: Gradient,
stereoMode: StereoMode = .center,
analysisMode: AnalysisMode = .peak,
numberOfSegments: Int = 20
) {
self.node = node
self.stereoMode = stereoMode
self.analysisMode = analysisMode
Expand Down

0 comments on commit 62247a4

Please sign in to comment.