How can you find out if a AVAudioPlayer finished playing a sound inside of a function?
A:
I'm assuming you really mean "via a function" because you should be able to use the obj-c bracket syntax [myAudioPlayer isPlaying]
from inside your function.
If my assumption is correct, it may be worthwhile to read this and this. Then the following will make sense:
objc_msgSend(myAudioPlayer,@selector(isPlaying:));
slf
2010-02-08 18:11:40
How can you put that in a "if"-statement?
Emil
2010-02-08 18:17:39
Nevermind, found it myself :)Thank you!
Emil
2010-02-08 18:19:47
You should NEVER call `objc_msgSend` directly.
Jacob Relkin
2010-07-09 21:48:22