Contents

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 throws

Parameters

  • audioFormat:

    An audio format describing the expected input. The analyzer will load assets appropriate for the given format. If nil or 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 Progress object that reports the progress of the preparation work.

See Also

Improving responsiveness