Last active
July 13, 2016 13:37
-
-
Save saiday/b7c00117bf49b32cf8944d275abe8e9f to your computer and use it in GitHub Desktop.
FFT computation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSError *computationError; | |
| AVAudioFile *audioFile = [[AVAudioFile alloc] initForReading:[NSURL fileURLWithPath:self.filePath] error:&computationError]; | |
| if (computationError) { | |
| failure(computationError); | |
| return; | |
| } | |
| AVAudioFormat *audioFormat = audioFile.processingFormat; | |
| UInt32 audioFrameCount = (UInt32) audioFile.length; | |
| AVAudioPCMBuffer *buffer = [[AVAudioPCMBuffer alloc] initWithPCMFormat:audioFormat frameCapacity:audioFrameCount]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment