preLOAD声音通过iPhone AudioServices发挥 [英] Preload sounds played via iPhone AudioServices

查看:124
本文介绍了preLOAD声音通过iPhone AudioServices发挥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立使用AudioServices打短的声音一个iPhone应用程序。第一次发出声音,有半秒,而加载的声音起着如此前的延迟。这无疑使得一个尴尬的用户体验。

I built an iPhone app using AudioServices to play short sounds. The first time a sound is played, there's a delay of half a second or so while the sound loads before it plays. This definitely makes for an awkward user experience.

有没有办法来preLOAD鸣响AudioServices玩,或者我需要切换到audioQueues或播放声音的一些其他的方法?

Is there a way to preload sounds for AudioServices to play, or do I need to switch to audioQueues or some other method of playing sounds?

谢谢,
摩诃

推荐答案

这是一个众所周知的问题。在AudioServices一切都懒洋洋地初始化。

This is a well known problem. Everything in AudioServices is initialized lazily.

我认为你最好的选择是核心音频和OpenAL的之间。 OpenAL的可能是矫枉过正,但它有一个简单的API。该oalTouch例子是一个很好的起点。

I think that your best choice is between Core Audio or OpenAL. OpenAL might be overkill, but it has a simple API. The oalTouch example is a good place to start.

核心音频更原始一点,但它是有据可查的。 iPhone的SDK的OpenAL是建立在它之上。

Core Audio is a bit more raw, but it's well documented. The iPhone's OpenAL SDK is built on top of it.

这篇关于preLOAD声音通过iPhone AudioServices发挥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆