mindwarpltd
asked on
Need to show controls and wait for sounds to play in sequence ?
I'm developing an app where I need to un-hide labels and play sounds in sequence.
So...
label1.hide = NO;
play sound 1
wait for sound to finish
label2.hide = NO;
play sound 2
wait for sound to finish
So...
label1.hide = NO;
play sound 1
wait for sound to finish
label2.hide = NO;
play sound 2
wait for sound to finish
ASKER
But none of these show me how to wait for the the sound file to finish before the next one is played
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AudioandVideoTechnologies/AudioandVideoTechnologies.html
The first example from that link create a sound from a file, then (few lines below) you will see the code playing it. It works.
Here is a tutorial:
How to Play a Short Sound in iPhone Code
http://howtomakeiphoneapps.com/2009/08/how-to-play-a-short-sound-in-iphone-code/
It is an easy stuff and everything will work for you in few minutes.
Here is AVAudioPlayer:
http://9mmedia.com/blog/?p=308
Tutorial about this approach:
How To Play Sounds In Your iPhone
http://www.iphoneapptuts.com/audio-sound/how-to-play-sounds-in-your-iphone/