PDA

View Full Version : Action When the Sound Stops Playing




yutamic
Jan 13, 2009, 07:53 PM
I'm having a hard time figuring out a way to start an action when a sound has finished playing.
I'm using the AVFoundation to play different sounds that ranges from a minute to about 3 minutes.
I've managed to work things out on playing the sounds,
but I want to have the text field to display a certain word, right when the sound is done playing.

I'd appreciate if there are any tips or hints to help me out on this problem.
Thanks.



jnic
Jan 14, 2009, 11:27 AM
Try the audioPlayerDidFinishPlaying (http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVAudioPlayerDelegateProtocolReference/Reference/Reference.html#//apple_ref/doc/uid/TP40008068-CH1-DontLinkElementID_2) method of of the AVAudioPlayerDelegate protocol.

yutamic
Jan 15, 2009, 02:13 AM
Thanks jnic!!
I've managed to work things out using that method!

hemalimojidra
Jan 16, 2009, 10:59 PM
Thanks jnic!!
I've managed to work things out using that method!

I am getting problem with this AvFoundation Framework. How you have put your code and which is your sdk and mac version?
I am facing problem related to this framework. Would you please tell me?