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

# AudioFormatGetProperty(_:_:_:_:_:)

Gets the value of an audio format property.

```
func AudioFormatGetProperty(_ inPropertyID: AudioFormatPropertyID, _ inSpecifierSize: UInt32, _ inSpecifier: UnsafeRawPointer?, _ ioPropertyDataSize: UnsafeMutablePointer<UInt32>?, _ outPropertyData: UnsafeMutableRawPointer?) -> OSStatus
```

## Parameters

`inPropertyID`

An [`AudioFormatPropertyID`](/documentation/AudioToolbox/AudioFormatPropertyID) constant. For a list of these constants, see [Audio Format Property Identifiers](/documentation/AudioToolbox/1577853-audio-format-property-identifier).

`inSpecifierSize`

The size of the specifier data.

`inSpecifier`

A buffer of data used as an input argument for querying some of the properties.

`ioPropertyDataSize`

On input, the size of the `outPropertyData` buffer. On output, the number of bytes written to the buffer.

`outPropertyData`

The buffer to write the property data to. If the `outPropertyData` parameter is `NULL` and `ioPropertyDataSize` is not `NULL`, the amount that would have been written is reported.

## Return Value

A result code. Returns `noErr` if successful.

## Discussion

Some Core Audio property values are C types and others are Core Foundation objects.

If you call this function to retrieve a value that is a Core Foundation object, then this function—despite the use of “Get” in its name—duplicates the object. You are responsible for releasing the object, as described in [The Create Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029) in [Memory Management Programming Guide for Core Foundation](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/CFMemoryMgmt.html#//apple_ref/doc/uid/10000127i).

---

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)