When I execute this line of code:
self.forwardDCTSetup = vDSP.DCT(count: 40, transformType: vDSP.DCTTransformType.II)!
I get:
Fatal error: Unexpectedly found nil while unwrapping an Optional value
I am following this tutorial almost exactly: https://developer.apple.com/documentation/accelerate/signal_extraction_from_noise.
The
vDSP.DCTfollows the same rules asvDSP_DCT_CreateSetupwith regard to length / count:See: https://developer.apple.com/documentation/accelerate/1449930-vdsp_dct_createsetup