I'm using AudioStreamer and everything works fine, except when I switch between ce开发者_运维百科llular and wifi network. It imediately stopps.
I tested it without leaving the app by switching off the wifi network, so i can proof the problem is not caused when the app is in the background.
So, did anyone have problems with AudioStreamer when switching between networks ?
cheers Simon
It makes sense as the network change is an interruption in data flow… Put a breakpoint in the stop
and pause
methods to see what is calling it. My suspicion is that it is being called in the handleInterruptionChangeToState
method (line 1924)
Some time back i also had the problem with the AudioStreamer when the 4.0 background feature was added it stops buffering as soon as the app goes in the background. It was solved because i missed the key in the info.plist :) . But it was giving me problems after that also crashes and sometimes it use to stop.
So i just used NSURLConnection to download the data and provide it to the player. It worked g8. And if it had some kind error it worked well with the below method
- (void)applicationWillEnterForeground:(UIApplication *)application
But i think changing the network can cause problem but you can try with a sample app with NSURLConnection.
精彩评论