---
title: kAudioQueueHardwareCodecPolicy_PreferHardware
framework: audiotoolbox
role: symbol
role_heading: Global Variable
path: audiotoolbox/kaudioqueuehardwarecodecpolicy_preferhardware
---

# kAudioQueueHardwareCodecPolicy_PreferHardware

The audio queue will use a hardware codec if one is available and if its use permitted by the audio session category that you have set; otherwise, it will use a software codec if one is available.

## Declaration

```swift
var kAudioQueueHardwareCodecPolicy_PreferHardware: UInt32 { get }
```

## See Also

### Constants

- [kAudioQueueProperty_HardwareCodecPolicy](audiotoolbox/kaudioqueueproperty_hardwarecodecpolicy.md)
- [kAudioQueueHardwareCodecPolicy_Default](audiotoolbox/kaudioqueuehardwarecodecpolicy_default.md)
- [kAudioQueueHardwareCodecPolicy_UseSoftwareOnly](audiotoolbox/kaudioqueuehardwarecodecpolicy_usesoftwareonly.md)
- [kAudioQueueHardwareCodecPolicy_UseHardwareOnly](audiotoolbox/kaudioqueuehardwarecodecpolicy_usehardwareonly.md)
- [kAudioQueueHardwareCodecPolicy_PreferSoftware](audiotoolbox/kaudioqueuehardwarecodecpolicy_prefersoftware.md)
