Ian Vink
Ian Vink

Reputation: 68810

Troubleshooting "AudioQueueObject::IONodeConnection::_AcquireHardwareCodec: failed ('hwiu')" when playing sound file

[Error]: 21:46:56.148 [AudioQueueServer] AudioQueueObject::IONodeConnection::_AcquireHardwareCodec: failed ('hwiu')

That's an error I am getting when playing a sound file. Is this a codec issue or a problem with the sound file itself?

Upvotes: 3

Views: 1105

Answers (1)

Don
Don

Reputation: 3684

From the docs, that error, 'hwiu', means "Hardware in use". The hardware codec is unavailable. If you are creating your own AudioQueue, you can set the hardware codec policy to kAudioQueueHardwareCodecPolicy_PreferSoftware, which will try the software codec first and fallback on the hardware codec, e.g.:

AudioQueueSetProperty(yourQueue, 
                      kAudioQueueProperty_HardwareCodecPolicy,
                      &kAudioQueueHardwareCodecPolicy_PreferSoftware,
                      sizeof(kAudioQueueHardwareCodecPolicy_PreferSoftware));

Upvotes: 1

Related Questions