---
title: "AudioQueueOfflineRender(_:_:_:_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/audioqueueofflinerender(_:_:_:_:)"
---

# AudioQueueOfflineRender(_:_:_:_:)

Exports audio to a buffer, instead of to a device, using a playback audio queue.

## Declaration

```swift
func AudioQueueOfflineRender(_ inAQ: AudioQueueRef, _ inTimestamp: UnsafePointer<AudioTimeStamp>, _ ioBuffer: AudioQueueBufferRef, _ inNumberFrames: UInt32) -> OSStatus
```

## Parameters

- `inAQ`: The playback audio queue.
- `inTimestamp`: The time corresponding to the beginning of the current audio queue buffer. This function uses the mSampleTime field of the doc://com.apple.documentation/documentation/CoreAudioTypes/AudioTimeStamp data structure.
- `ioBuffer`: On input, a buffer you supply to hold rendered audio data. On output, the rendered audio data, which you can then write to a file.
- `inNumberFrames`: The number of frames of audio to render.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion When you change a playback audio queue’s rendering mode to offline, using the AudioQueueSetOfflineRenderFormat(_:_:_:) function, you gain access to the rendered audio. You can then write the audio to a file, rather than have it play to external hardware such as a loudspeaker.

## See Also

### Related Documentation

- [AudioQueueStart(_:_:)](audiotoolbox/audioqueuestart(_:_:).md)

### Performing Offline Rendering

- [AudioQueueSetOfflineRenderFormat(_:_:_:)](audiotoolbox/audioqueuesetofflinerenderformat(_:_:_:).md)
