Preload sounds played via iPhone AudioServices

前端 未结 1 650
自闭症患者
自闭症患者 2020-12-22 02:47

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 pl

相关标签:
1条回答
  • 2020-12-22 03:19

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

    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.

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

    0 讨论(0)
提交回复
热议问题