Contents

add(_:withObserver:)

Adds a new analysis request to the audio stream analyzer.

Declaration

func add(_ request: any SNRequest, withObserver observer: any SNResultsObserving) throws

Parameters

  • request:

    A sound analysis request.

  • observer:

    An Snresultsobserving instance that receives the analyzer’s results. The analyzer maintains a weak reference to the observer.

Mentioned in

Discussion

You can add requests to an analyzer that’s actively analyzing an audio stream. The analyzer throws an error (Swift) or returns NO (Objective-C) if it can’t accept the new request, such as a request with an audio format that doesn’t match the analyzer’s.

See Also

Managing Requests