views:

80

answers:

2

hi, that's the code

play sound
[soundSh play];

later stop sound (not pause!)
[soundShe stop];

later play sound again
[soundSh play];

fixed, i call sound int again ...

A: 

I am not sure why your example code isn't working. However, if you could dispose of the sound using AudioServicesDisposeSystemSoundID, which will stop the sound. You'll need to recreate the sound if you intend to use it again, and it will (obviously) start from the beginning.

mikestew
A: 

In AVFoundation, after you stop, you need to set the currentLocation back to 0 to get it back to the beginning.

[audioPlayer stop];
audioPlayer.currentTime = 0;

Then next time you play, it will play from the beginning.

Jay