开发者

Best alternative to AudioServices on the iPhone

I'm using AudioServices to play a sound in my app:

AudioServicesCreateSystemSoundID (soundFileURLRef,&soundFileObject );

and then

AudioServices开发者_如何学编程PlaySystemSound (soundFileObject);

The sound plays but because I need to play it frequently (its 0.24 seconds long) I get a strange unnatural sounding repetition.

You can hear it at http://testing.lukem.co.uk/Simulator/Simulator.html

The other noise is me adjusting the volume - oops.

Thanks!


If you want the most precise control over timing of a sound's repetition, use Audio Queues or Audio Unit RemoteIO, and count samples between where you start filling the callback buffers with your sound's raw/PCM sample array.


I went with open source openAL library Finch.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜