<!--
{
  "documentType" : "article",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/1618727-audio-queue-hardware-codec-polic",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Audio Queue Hardware Codec Policy"
}
-->

# Audio Queue Hardware Codec Policy

## Topics

### Constants

[`var kAudioQueueHardwareCodecPolicy_Default: UInt32`](/documentation/AudioToolbox/kAudioQueueHardwareCodecPolicy_Default)

If the required codec is available in both hardware and software implementations, the audio queue will use a hardware codec if its audio session category permits; it will use a software codec otherwise. If the required codec is available in only one form, that codec implementation is used.

[`var kAudioQueueHardwareCodecPolicy_PreferHardware: UInt32`](/documentation/AudioToolbox/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.

[`var kAudioQueueHardwareCodecPolicy_PreferSoftware: UInt32`](/documentation/AudioToolbox/kAudioQueueHardwareCodecPolicy_PreferSoftware)

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

[`var kAudioQueueHardwareCodecPolicy_UseHardwareOnly: UInt32`](/documentation/AudioToolbox/kAudioQueueHardwareCodecPolicy_UseHardwareOnly)

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

[`var kAudioQueueHardwareCodecPolicy_UseSoftwareOnly: UInt32`](/documentation/AudioToolbox/kAudioQueueHardwareCodecPolicy_UseSoftwareOnly)

The audio queue will use a software codec if one is available.



---

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)