You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to draw an image based on a mp3
I Follow install your request and copy past your example
let waveformImageDrawer = WaveformImageDrawer()
let audioURL = Bundle.main.url(forResource: "example_sound", withExtension: "m4a")!
waveformImageDrawer.waveformImage(fromAudioAt: audioURL, with: .init(
size: topWaveformView.bounds.size,
style: .filled(UIColor.black),
position: .top) { image in
// need to jump back to main queue
DispatchQueue.main.async {
self.topWaveformView.image = image
}
})
but i've got this error on line 6 on the "{":
"Trailing closure passed to parameter of type 'CGFloat?' that does not accept a closure"
Can you give me advice to fix the problem please ?
Thanks in advance
The text was updated successfully, but these errors were encountered:
I would like to draw an image based on a mp3
I Follow install your request and copy past your example
let waveformImageDrawer = WaveformImageDrawer()
let audioURL = Bundle.main.url(forResource: "example_sound", withExtension: "m4a")!
waveformImageDrawer.waveformImage(fromAudioAt: audioURL, with: .init(
size: topWaveformView.bounds.size,
style: .filled(UIColor.black),
position: .top) { image in
// need to jump back to main queue
DispatchQueue.main.async {
self.topWaveformView.image = image
}
})
but i've got this error on line 6 on the "{":
"Trailing closure passed to parameter of type 'CGFloat?' that does not accept a closure"
Can you give me advice to fix the problem please ?
Thanks in advance
The text was updated successfully, but these errors were encountered: