Instance Method

add(_:withObserver:)

Adds a new analysis request to the audio file analyzer.

Declaration

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

Parameters

request

An audio analysis request to perform on the audio stream.

observer

The object that receives the analysis results for the supplied request. The analyzer holds a weak reference to this object.

error

A pointer to an error object.

If an error occurs, this pointer is set to an actual error object containing the error information. You can specify nil for this parameter if you don't want the error details.

Return Value

This method throws an error if you call it while the analyzer is processing the file.

See Also

Managing Requests

func remove(SNRequest)

Removes an existing request from the audio file analyzer.

func removeAllRequests()

Removes all requests from the audio file analyzer.