---
title: allocateRenderResources()
framework: audiotoolbox
role: symbol
role_heading: Instance Method
path: audiotoolbox/auaudiounit/allocaterenderresources()
---

# allocateRenderResources()

Allocates resources required to render audio.

## Declaration

```swift
func allocateRenderResources() throws
```

## Mentioned in

Migrating Your Audio Unit Host to the AUv3 API Rendering Spatial Audio from Bluetooth headphones

## Discussion

Discussion 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 AudioUnitInitialize(_:) API. note: 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.

## See Also

### Managing the Render Cycle

- [deallocateRenderResources()](audiotoolbox/auaudiounit/deallocaterenderresources().md)
- [reset()](audiotoolbox/auaudiounit/reset().md)
- [renderResourcesAllocated](audiotoolbox/auaudiounit/renderresourcesallocated.md)
- [renderBlock](audiotoolbox/auaudiounit/renderblock.md)
- [scheduleParameterBlock](audiotoolbox/auaudiounit/scheduleparameterblock.md)
- [maximumFramesToRender](audiotoolbox/auaudiounit/maximumframestorender.md)
- [token(byAddingRenderObserver:)](audiotoolbox/auaudiounit/token(byaddingrenderobserver:).md)
- [removeRenderObserver(_:)](audiotoolbox/auaudiounit/removerenderobserver(_:).md)
- [AURenderObserver](audiotoolbox/aurenderobserver.md)
