How to resume the game from the background

I am making an online radio station application. The app works well.
My radio does not resume after the call ends. 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 (inInterruptionState == kAudioSessionEndInterruption) { // [radio start]; // this doesn't work - radio is gone ; } } 

Can anyone help?

+4
source share
1 answer

similar questions were found, but without an answer too ...

Do Not Launch AudioListenerInterruptionEnd Trigger

fooobar.com/questions/507815 / ...

Perhaps this may help you.

-1
source

Source: https://habr.com/ru/post/1345031/


All Articles