简体   繁体   中英

Create sound on iPhone programmatically

I am trying to find how to create a sound programmatically, because in my app I will have to play a lot of sounds with a different frequency (and with the same timbre and loudness), so I can't make them all before programming.

I have check on this forum and I have found a link to http://www.iphonedevsdk.com/forum/iphone-sdk-development/45613-creating-audio-programmatically.html but it isn't fully explained.

Thank you!!

You don't necessarily need to create any files to play lots of sounds at different frequencies on an iPhone. Instead, the OpenAL API might be useful.

ExatAudioFile ( ExtAudioFileCreateWithURL ) and AudioFile ( AudioFileCreateWithURL ) APIs would be a good starting point. They are from AudioToolbox.framework, and available on OS X and iOS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM