Make a Button Play a sound

Discussion in 'iOS Programming' started by joshsroka, Oct 2, 2008.

  1. joshsroka macrumors member

    Oct 2, 2008
    Hey guys I am writing my first Iphone program and trying to keep it simple as a soundboard, so I created my interface and i know i have to add lines of code where i label the soundfile indentifier and then a line of code where i tell the button to play this sound file. My question is where in xcode do i write this programming? Hope now that the SDK is down I can find some good tutorials.

  2. hchung macrumors 6502a

    Oct 2, 2008
    The metronome and games on the sample code page of Apple's iPhone Developer site should have example code for playing sounds.

    Depending on the length and size of each sound, there will be things you'll need to consider. Also, consider if you want just a single sound playing or a bunch of them playing together.
  3. joshsroka thread starter macrumors member

    Oct 2, 2008
    Thanks for your help

    Thanks for your help I downloaded the sysSound which is exactly what i wanted i am confused and hope someone can walk me through some parts such as where the file is defined and recalled.

Share This Page