开发者

How to resume playing from background

开发者 https://www.devze.com 2023-02-19 14:44 出处:网络
I am making an online radio station app. The app works good. My radio doesn\'t resume after the call is ended. And I have to restart it again.

I am making an online radio station app. The app works good.

My radio doesn't resume after the call is ended. And I have to restart it again.

Here is my code:

    void MyAudioSessionInterruptionListener(void *inClientData, UInt32 inInterruptionState)
    {
        ShoutcastAudioStreamer *radio = (ShoutcastAudioStreamer*)inClientData;
        if (inInterruptionState == kAudioSessionBeginInterruption) {
            [radio stop];
            NSLog(@"kAudioSessionBeginInterruption");
        }
        else if (inInterrup开发者_StackOverflow中文版tionState == kAudioSessionEndInterruption) {
        //  [radio start]; // this doesn't work - radio is gone
;
        }
    }

Can any one help?


similar questions were found, but without reply too...

Do not get the AudioListenerInterruptionEnd trigger

https://stackoverflow.com/q/8819315/751932

Probably it can help you.

0

精彩评论

暂无评论...
验证码 换一张
取 消