2

I'm using AudioStreamer and everything works fine, except when I switch between cellular 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

endo.anaconda
  • 2,449
  • 4
  • 29
  • 55

2 Answers2

2

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)

coneybeare
  • 33,113
  • 21
  • 131
  • 183
1

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.

Sneha
  • 1,444
  • 15
  • 24