Contents

analyzeSequence(_:)

Analyzes an input sequence, returning when the sequence terminates.

Declaration

final func analyzeSequence<InputSequence>(_ inputSequence: InputSequence) async throws -> CMTime? where InputSequence : Sendable, InputSequence : AsyncSequence, InputSequence.Element == AnalyzerInput

Parameters

  • inputSequence:

    An input sequence to analyze.

Return Value

The time-code of the last audio sample that was consumed from this or an earlier input sequence, or nil if no audio sample has been consumed. You may use this value for the parameter of finalizeAndFinish(through:) (or other methods).

Discussion

When this method returns, the last audio consumed from the input sequence may still be undergoing analysis. To wait for the analysis to complete, call another method such as finalize(through:) and await its return.

If you cancel the task executing this method, most input sequences will terminate early, causing this method to return early. The method returns the time-code of the last audio sample that was consumed and does not throw CancellationError.

See Also

Performing analysis