Page 1 of 1

Playback problems on iPhone

PostPosted: Wed Aug 18, 2010 4:39 pm
by shaun5stu
I'm using iSub on my iPhone and version 4.0.1 of subsonic server on Windows 7. I can stream songs to my iPhone fine for about 25 minutes. After that, songs will stop for 2 to 5 seconds, then start again. The songs start at the same place they stopped - it's not skipping. It's almost like the phone processor gets too busy doing something else. I'm on an iPhone 3G with no multitasking.

The problem will continue, even after I reboot the phone, which leads me to believe it's not related to the phone. My subsonic server logs shows entries like the following when this occurs:

200911815 [btpool0-61] INFO org.apache.http.impl.client.DefaultHttpClient - I/O exception (java.net.SocketException) caught when processing request: Connection reset
200911815 [btpool0-61] INFO org.apache.http.impl.client.DefaultHttpClient - Retrying request

Once this problem starts happening, it will continue unless I stop using the app for about 30 minutes. Then I can play for another 25 minutes or so until it starts again.

Any ideas?

PostPosted: Thu Aug 19, 2010 12:08 am
by shaun5stu
FYI, it seems this is related to streaming over 3G. If I stream via WiFi, the problem doesn't happen. If I stream via 3G, it does - even when the phone is not moving and I have full signal strength.

PostPosted: Fri Aug 20, 2010 8:30 pm
by Kirk
Have you tried simply rebooting your router? Since it said the connection was reset, that could indicate a firewall problem.

Also, can you try streaming on another outside system that isn't your iPhone? Maybe login to the web interface at a friend's house or at work?

Cheers,
Kirk

More info

PostPosted: Thu Aug 26, 2010 3:22 pm
by shaun5stu
Sorry for the delayed response. Rebooting the router did not solve the problem.

I've done some more testing and I think I see where the problem is.

Streaming to a web browser on a computer outside my own network works fine. I've been doing that for over an hour with no issues.

The issue seems to be related to the iPhone. When using iSub on an iPhone that is not plugged in to power, it plays fine as long as the screen is on. After a while, the screen will dim and then the lock screen will appear, also dimmed. Songs play fine at this point too. As soon as the screen shuts off, playback starts stopping and stopping. It looks like the iPhone goes into some sort of powersave mode or something.

If the iPhone is plugged in to power, playback if fine, even when the screen shuts off.

PostPosted: Thu Aug 26, 2010 3:25 pm
by shaun5stu
Not sure if what I posted above is a second issue or the same issue as I first posted about (the problem happening after 25 minutes). I know I did a test a week ago using 3G with my phone plugged in and I did see the problem after some time. I'll try another test later today with the phone plugged in and see if I can reproduce the problem.

PostPosted: Sat Aug 28, 2010 7:22 pm
by Kirk
Before I knew about Subsonic (the dark ages), I streamed Shoutcast radio while I was asleep. I found that my iPod Touch would sometimes terminate the stream in the middle of the night, even if it was plugged in. If I streamed on my laptop, the issue did not surface, so I know it was not my WiFi network, it was the iPod Touch. The iPhone is most likely entering a power saving mode... I agree.

I'm not sure what to tell you to try though... the only thing I can suggest is, if you're jail broken, try downloading a program from Cydia called Insomnia. On the iPod Touch, it could be used to keep the WiFi from dropping out.

I'm not sure how it works with 3G. I haven't needed it on my 3G iPad, because it seems to do power management differently and I don't have issues with connectivity on it.

Cheers,
Kirk

PostPosted: Sun Aug 29, 2010 11:55 pm
by einsteinx2
This is definitely a unique issue, I haven't come across that in testing and neither have my beta testers. Since it's only happening on 3G for you, I wonder if it has to do with the custom network code I wrote to handle throttling of downloads (an app store requirement). I was trying to use the well established ASIHTTPRequest class by Ben Copsey, but ran into an issue that affected users on O2's 3G network in the UK so I had to write my own.

Subsonic is saying that the connection was reset, which would indicate that it's happening on the phone side. Maybe there is something weird about your phone that's causing this problem? You said in your email to me that you are jailbroken, though that shouldn't cause any problems as I know many people that are jailbroken and use iSub. Try using the insomnia app like Kirk suggested and see if the issue still happens. That seems to be the best lead so far.

PostPosted: Mon Aug 30, 2010 2:35 pm
by shaun5stu
Thanks for the info. I'll try Insomnia on the way home tonight.

FYI, it seems this is not an iSub-specific issue. I was using the iPod app and listening to a podcast on the way in to work this morning and the same thing happened - as soon as the screen turned off, playback got funky.

PostPosted: Thu Sep 02, 2010 2:10 am
by shaun5stu
As a follow-up, it looks like using Insomnia has solved my problems. Been using it for two days and the problem has not returned. Thanks for the help!