Allocates resources required to render audio.
SDKs
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
Framework
- Audio
Toolbox
Declaration
func allocateRenderResources() throws
Parameters
outError
Returns an error if the operation failed, or
nil
if it succeeded.
Return Value
true
if the operation succeeded.false
if the operation failed.
Discussion
Hosts must call this before beginning to render. Subclasses should call the superclass implementation.
This version 3 method is bridged to the version 2 Audio
API.
Handling Errors in Swift:
In Swift, this method returns Void
and is marked with the throws
keyword to indicate that it throws an error in cases of failure.
You call this method in a try
expression and handle any errors in the catch
clauses of a do
statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.