本文介绍了我需要这里面的音频播放技术?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有麻烦选择合适的音频播放技术。有一吨的技术,在iPhone上使用,它是如此的混乱。

I have trouble choosing the right audio playback technology. There's a ton of technologies to use on the iPhone, it's so confusing.

我需要做的是这样的:


  • 开始打短的声音范围0.1至2秒。

  • start playing short sounds ranging between 0.1 and 2 seconds

高品质的回放,无裂纹(我听到一些iPhone的音频播放技术做起点和终点的噼啪声,这是坏的!)

high quality playback, no crackle (I heard some of the iPhone audio playback technologies do a crackle sound on start or end, which is bad!)

的能力,开始声音的播放,同时还有已经另外一个现在打右(二,在同一时间三个或三个以上的声音)

ability to start playback of a sound, while there's already another one playing right now (two, three or more sounds at the same time)

什么你会建议在这里,为什么?感谢: - )

What would you suggest here, and why? Thanks :-)

推荐答案

有基本上在iPhone上播放音频四个选项:

There are basically four options for playing audio on the iPhone:


  1. Audio工具箱。容易的,但不仅有利于在应用程序中播放声音效果()。

  1. Audio Toolbox. Easy, but only good for playing sound effects in applications (sample code).

Audio队列服务。功能非常强大,可以做任何事情。 C API,pretty凌乱的工作。回调,水桶,疼痛。

Audio Queue Services. Very powerful, can do anything. C API, pretty messy to work with. Callbacks, buckets, pain.

AVAudioPlayer.关于最简单的选择。可以播放COM pressed音频,用一个简单的包装,你可以轻松播放同一样品的多个实例一次(仅限于非COM pressed声音,因为只有一个硬件音频解codeR)。开始播放声音与 AVAudioPlayer 似乎的,可以是一个问题。

AVAudioPlayer. About the easiest option. Can play compressed audio, with a simple wrapper you can easily play multiple instances of the same sample at once (non-compressed audio only, as there is only one HW audio decoder). Starting to play a sound with AVAudioPlayer seems to lag about 20 ms, could be a problem.

。复杂性和功能之间的妥协得体。声音不落后,可以打多个声音就好了,但你必须做大量的工作自己。我已经写了名为声音引擎,可以帮助你。

OpenAL. Decent compromise between complexity and features. Sounds do not lag, you can play multiple sounds just fine, but you have to do a lot of the work yourself. I’ve written a sound engine called Finch that can help you.

不知道很多有关开裂,从来没有经历过。我想有一些问题,打无缝融为一体pressed循环与 AVAudioPlayer ,可以保存循环,不COM pression被克服。

Don’t know much about cracking, never experienced it. I think there were some issues with playing seamless compressed loops with AVAudioPlayer, can be overcome by saving the loop without compression.

这篇关于我需要这里面的音频播放技术?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 10:15