Contents

prepareToAnalyze(in:)

Prepares the analyzer to begin work with minimal startup delay.

Declaration

final func prepareToAnalyze(in audioFormat: AVAudioFormat?) 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.

Discussion

The analyzer normally performs some configuration lazily as the first audio input becomes available. This method performs that work immediately to reduce or eliminate delays in analyzing the first audio input.

See Also

Improving responsiveness