Find if audio is currently playing
I need to find out if my program is playing any sound, and if it does, I want to stop the previous sound and start a new one. KAudioSessionProperty_OtherAudioIsPlaying always returns 0 (maybe just checks if iPod music is playing) There's another property kAudioQueueProperty_IsRunning, but this always returns 0 whether audio is working or not. Can someone please tell me how can I know if audio is playing in my application or not.
Thank.
Note. The class I am calling my streamer from is freed when I return to the view hierarchy. So I don't have access to the AudioFileStreamID to see if the sound is playing. I need to use one of the properties provided by the SDK.
+1
source to share