prepareToAnalyze(in:withProgressReadyHandler:)
Prepares the analyzer to begin work with minimal startup delay, reporting the progress of that preparation.
Declaration
final func prepareToAnalyze(in audioFormat: AVAudioFormat?, withProgressReadyHandler progressReadyHandler: sending ((Progress) -> Void)?) async throwsParameters
- audioFormat:
An audio format describing the expected input. The analyzer will load assets appropriate for the given format. If
nilor if the input is not in this format, the analyzer will reconfigure itself when it processes the actual audio. - progressReadyHandler:
A closure that this method calls when progress reporting becomes available. The closure takes the following parameter:
- progress
A
Progressobject that reports the progress of the preparation work.