Saturday, July 11, 2009

Can now play sounds on iPhone

It's Saturday so that means wife at work. I generally use these wife-free times to code the iPhone. Today I had I fairly good breakthrough: Playing sounds. I recorded my voice using Quicktime Pro and my microphone. Exported the file to .wav format, and then included the sound file in my Resources folder in my project. I included the Audiobox framework and threw in some code from my Callen book. A couple of tweaks to the code and it compiled. I linked the IBAction in Interface Builder, saved it, and then I ran it through the Simulator. Lo and behold, I heard my voice when I clicked on the button. I just wish I didn't sound so goofy.

No comments: