analyzeSequence(from:)
Analyzes an input sequence created from an audio file, returning when the file has been read.
Declaration
final func analyzeSequence(from audioFile: AVAudioFile) async throws -> CMTime?Parameters
- audioFile:
An AVAudioFile opened for reading.
Return Value
The time-code of the last audio sample of the input, or nil if the file was empty. You may use this value for the parameter of finalizeAndFinish(through:) (or other methods).
Discussion
When this method returns, the input sequence will have been consumed, but the last of the audio may still be undergoing analysis. To wait for the analysis to complete, call another method such as finalize(through:) and await its return.