---
title: "AudioQueueSetOfflineRenderFormat(_:_:_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/audioqueuesetofflinerenderformat(_:_:_:)"
---

# AudioQueueSetOfflineRenderFormat(_:_:_:)

Sets the rendering mode and audio format for a playback audio queue.

## Declaration

```swift
func AudioQueueSetOfflineRenderFormat(_ inAQ: AudioQueueRef, _ inFormat: UnsafePointer<AudioStreamBasicDescription>?, _ inLayout: UnsafePointer<AudioChannelLayout>?) -> OSStatus
```

## Parameters

- `inAQ`: The playback audio queue whose rendering mode and audio format you want to set.
- `inFormat`: The audio format for offline rendering. The format must be some sort of linear PCM. If the format has more than one channel, it must be interleaved. For more information on the doc://com.apple.documentation/documentation/CoreAudioTypes/AudioStreamBasicDescription structure, see doc://com.apple.documentation/documentation/CoreAudio/core-audio-data-types. Pass NULL to disable offline rendering and return the audio queue to normal output to an audio device.
- `inLayout`: The channel layout for offline rendering. For more information on the doc://com.apple.documentation/documentation/CoreAudioTypes/AudioChannelLayout structure, see doc://com.apple.documentation/documentation/CoreAudio/core-audio-data-types. Pass NULL when using this function to disable offline rendering.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion Use this function to set a playback audio queue to perform offline rendering, such as for export to an audio file. In offline rendering mode, a playback audio queue does not connect to external hardware. You can also use this function to restore an audio queue to normal rendering mode by passing NULL in the inFormat and inLayout parameters.

## See Also

### Performing Offline Rendering

- [AudioQueueOfflineRender(_:_:_:_:)](audiotoolbox/audioqueueofflinerender(_:_:_:_:).md)
