本文介绍了故障排除和QUOT; AudioQueueObject :: IONodeConnection :: _ AcquireHardware codeC:失败('hwiu')"播放声音文件时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[错误]:21:46:56.148 [AudioQueueServer] AudioQueueObject :: IONodeConnection :: _ AcquireHardware codeC:失败('hwiu')

这是我播放声音文件时得到一个错误。这是一个codeC问题或声音文件本身?

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?

推荐答案

从文档,该错误,hwiu',意思是在使用硬件。硬件codeC不可用。如果您要创建自己的AudioQueue,您可以设置硬件codeC的政策, kAudioQueueHardware codecPolicy_ preferSoftware ,它会尝试该软件codeC第一和后备硬件codeC,例如:

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));

这篇关于故障排除和QUOT; AudioQueueObject :: IONodeConnection :: _ AcquireHardware codeC:失败('hwiu')"播放声音文件时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 22:37