Skip to content

Commit

Permalink
refactor(AudioVisualizationView): use trailing closure syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienFalcou committed Apr 28, 2019
1 parent 0220466 commit 555cbef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SoundWave/Classes/AudioVisualizationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ public class AudioVisualizationView: BaseNibView {
fatalError("trying to read audio visualization in write mode")
}

AudioContext.load(fromAudioURL: url, completionHandler: { audioContext in
AudioContext.load(fromAudioURL: url) { audioContext in
guard let audioContext = audioContext else {
fatalError("Couldn't create the audioContext")
}
self.meteringLevels = audioContext.render(targetSamples: 100)
self.play(for: 2)
})
}
}

// MARK: - Mask + Gradient
Expand Down

0 comments on commit 555cbef

Please sign in to comment.