---
title: "AudioFormatGetProperty(_:_:_:_:_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/audioformatgetproperty(_:_:_:_:_:)"
---

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

Gets the value of an audio format property.

## Declaration

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

## Parameters

- `inPropertyID`: An doc://com.apple.audiotoolbox/documentation/AudioToolbox/AudioFormatPropertyID constant. For a list of these constants, see doc://com.apple.audiotoolbox/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

Return Value A result code. Returns noErr if successful.

## Discussion

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 in Memory Management Programming Guide for Core Foundation.

## See Also

### Audio Format Services Functions

- [AudioFormatGetPropertyInfo(_:_:_:_:)](audiotoolbox/audioformatgetpropertyinfo(_:_:_:_:).md)
