<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/AudioQueueOfflineRender(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@AudioQueueOfflineRender"
  },
  "title" : "AudioQueueOfflineRender(_:_:_:_:)"
}
-->

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

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

```
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

A result code. See Result Codes.

## Discussion

When you change a playback audio queue’s rendering mode to offline, using the [`AudioQueueSetOfflineRenderFormat(_:_:_:)`](/documentation/AudioToolbox/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

[`AudioQueueStart(_:_:)`](/documentation/AudioToolbox/AudioQueueStart(_:_:))

Begins playing or recording audio.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)