|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
AudioServicesPlaySystemSound(soundID) - How to STOP a sound?
AudioServicesCreateSystemSoundID((CFURLRef)filePath, &soundID);
AudioServicesPlaySystemSound(soundID); I am playing a sound effect that is about 5 seconds long with the calls above. How do I stop the sound right in the middle of it playing? Ethan |
|
|
|
0
|
|
|
#2 |
|
You can't. If you can target the 2.2 SDK, you can use the AVAudioPlayer class, which makes manipulating sound a LOT easier than it was in 2.0/2.1
http://developer.apple.com/iphone/li...Reference.html
__________________
_________________________ kyle [at] bigsprocket.com http://www.bigsprocket.com -- iPhone programing and goodies! |
|
|
|
0
|
|
|
#3 |
|
There's no method to pause it (which is why most people use AudioQueue or OpenAL) or stop it (in a sense where you're simply stopping the sound ready to be played again), but you can use the AudioServicesDisposeSystemSoundID which will theoretically stop the sound.
|
|
|
|
0
|
|
|
#4 |
|
Another vote for AVAudio here.
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Mail - How to stop a message? | psiachris | Mac Applications and Mac App Store | 2 | Nov 17, 2007 09:55 PM |
| Gmail Question - how to stop old mail from being d/l'd? | Chupa Chupa | iPhone Tips, Help and Troubleshooting | 7 | Nov 7, 2007 11:04 AM |
| Finder's "Slideshow" option randomising images - how to stop it? | thomasp | Mac OS X | 1 | Aug 7, 2007 09:24 AM |
| AppleScript - How to Stop Script When Error Occurs? | Kelmon | Mac Programming | 2 | Jul 23, 2006 10:10 AM |
All times are GMT -5. The time now is 03:37 PM.









Linear Mode

