FFTTap crash
EnjoyWT opened this issue · comments
EnjoyWT commented
macOS Version(s) Used to Build
macOS 13 Ventura
Xcode Version(s)
Xcode 14
Description
1. I just try to use FFTTap , but when it use it like this , the code crash.
xcode version 15.1
bufferSize = 1024
fftTap = FFTTap(mic, bufferSize: UInt32(bufferSize),fftValidBinCount: .thirtyTwo, callbackQueue: .main, handler: {[weak self] fs in
guard let self = self else{return}
print(fs)
})
fftTap crash .
RawBufferTap works fine
speechTap = RawBufferTap(mic, bufferSize: UInt32(bufferSize), callbackQueue: .main) {[weak self] buffer,when in
guard let self = self else{return}
buffer.frameLength = AVAudioFrameCount(bufferSize)
let spectra = self.analyzer.analyse(with: buffer)
self.spectrumView.spectra = spectra
}
2. When i change the buffer to 4096 there have other crash
And the output
Crash Logs, Screenshots or Other Attachments (if applicable)
No response
Aurelius Prochazka commented
This appears to be an implementation bug. Are you trying to tap the same node twice? You can't. FFTTap is used in a few apps so I know it is working.