<!--
{
  "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/AudioQueueFreeBuffer(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@AudioQueueFreeBuffer"
  },
  "title" : "AudioQueueFreeBuffer(_:_:)"
}
-->

# AudioQueueFreeBuffer(_:_:)

Asks an audio queue to dispose of an audio queue buffer.

```
func AudioQueueFreeBuffer(_ inAQ: AudioQueueRef, _ inBuffer: AudioQueueBufferRef) -> OSStatus
```

## Parameters

`inAQ`

The audio queue that owns the audio queue buffer you want to dispose of.

`inBuffer`

The buffer to dispose of.

## Return Value

A result code. See Result Codes.

## Discussion

Disposing of an audio queue also disposes of its buffers. Call this function only if you want to dispose of a particular buffer while continuing to use an audio queue. You can dispose of a buffer only when the audio queue that owns it is stopped (that is, not processing audio data).

## See Also

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

Disposes of an audio queue.



---

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)