iPhone 硬件音频解码,同时支持多个音频文件
我正在开发一个 iPhone 应用程序,可以播放长(约 30 分钟)的 m4a 音频剪辑。剪辑全部存储在本地,我使用 AVAudioPlayer 来处理播放功能。我的应用程序对音频进行交叉淡入淡出,以便一种声音淡出,而另一种声音淡入。
根据 苹果的使用硬件音频解码一次只能播放一种声音。假设第一个声音正在硬件解码,第二个声音开始使用软件解码播放,那么第二个声音会在第一个声音播放完毕后切换到使用硬件解码,还是会一直使用软件解码?
似乎有一个 测试硬件解码器可用性的方法。我想看看这是否能让我得到我正在寻找的答案,但我只是好奇是否有人已经知道答案。即使您只知道测试此方法的正确方法,我也会很感激。这是我的第一个 iOS 应用程序,也是我第一次使用 C,所以我很盲目。
I'm developing an iPhone app that plays long (~30min) m4a audio clips. The clips are all stored locally and I'm using AVAudioPlayer to handle the playback functions. My app crossfades audio so that one sound fades out while another one fades in.
According to Apple's documentation only one sound at a time will be played using hardware audio decoding. Assuming that the first sound is being hardware decoded and the second sound starts playing using software decoding, will the second sound switch to using hardware decoding once the first sound has finished playing, or will it use software decoding the entire time?
It seems like there's a way to test for the availability of the hardware decoder. I'm going to see if that can get me the answer I'm looking for, but I was just curious if someone already knew the answer. Even if you just know the correct methodology for testing this, I'd appreciate it. This is my first iOS app and my first time working with C, so I'm flying blind.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论