views:

139

answers:

1

I'm working with the iPhone 3.0 SDK (bit of a novice really), and I have set up an Interface Builder View with several UIButtons in it. I also have several sound files in the Xcode project.

I have searched for this and none of the solutions seem to work for me. Does anyone know how to make a short sound play once upon pressing a button?

Sorry about the simplistic question, but Apple's avTouch doesn't build on my Xcode.

Thanks

A: 

For the most basic needs, the AVAudioPlayer class will work. It has the simplest interface on the iPhone SDK and is best suited for what you're describing.

If you need lower latency or multiple sounds at once, then your choice is between OpenAL or Core Audio. See the oalTouch example for OpenAL use.

Pestilence
Thanks for answering. I'm going to need OpenAL, and now know what I'm doing - thanks for the help!
Harry Elliott