Audiokit-绘制自定义波形路径

时间:2019-03-25 09:19:53

标签: swift plot draw audiokit waveform

我正在尝试使用Audiokit的AKOutputWaveformPlot.createPath()方法绘制一个自定义波形图路径(圆形波形路径),但是它不起作用。我为此方法提供的值没有任何影响。我想念什么?

let waveform = AKOutputWaveformPlot(input, frame: waveformRollingView.bounds)

        waveform.backgroundColor = nil
        waveform.plotType = .rolling
        waveform.shouldFill = true
        waveform.shouldMirror = true
        waveform.setRollingHistoryLength(1000)
        waveform.createPath(withPoints: <#T##UnsafeMutablePointer<CGPoint>!#>, pointCount: <#T##UInt32#>, in: <#T##EZRect#>)


        waveform.color = FlatWhite()
        waveform.waveformLayer.lineWidth = 2
        waveform.gain = 2

        waveformRollingView.addSubview(waveform)

无论我为withPoints,pointCount和in提供什么值,默认情况下都会绘制波形:

(waveform.createPath(withPoints: <#T##UnsafeMutablePointer<CGPoint>!#>, pointCount: <#T##UInt32#>, in: <#T##EZRect#>))

0 个答案:

没有答案