开发者

Best alternative to AudioServices on the iPhone

开发者 https://www.devze.com 2023-01-15 08:09 出处:网络
I\'m using AudioServices to play a sound in my app: AudioServicesCreateSystemSoundID (soundFileURLRef,&soundFileObject );

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

精彩评论

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