Page 1 of 3

3.6 Beta - Playback fixes

PostPosted: Tue Dec 04, 2012 6:41 am
by daneren2005
Here is a beta that hopefully fixes some of the playback issues people are having. Specifically it should address the pausing during playback people have been experiencing and I would like some feedback. I'm also hoping it helps with the restarting issue since playback doesn't switch off of the partial file when it's done downloading anymore. I'm guessing there is probably something messed up with how I handled the file swapping so let me know if you notice any bugs with it. Please give feedback.

Ps I tried to put a stream external player command in there, but it doesn't appear to work. If anyone is able to get it to work with anything let me know.

Re: 3.6 Beta - Playback fixes

PostPosted: Tue Dec 04, 2012 1:13 pm
by mr_nobody
Damn, I would love to test this since I have the "first song in playlist plays partway through and then skips back to beginning" issue but a botched upgrade on my server means no subsonic at the moment. :cry:

[edit]: Just tested this on the demo server and after about 30 seconds, the first track will stop playing (this is actually worse than skipping to the beginning since it requires user intervention to get going again).

Re: 3.6 Beta - Playback fixes

PostPosted: Tue Dec 04, 2012 10:17 pm
by daneren2005
mr_nobody wrote:Damn, I would love to test this since I have the "first song in playlist plays partway through and then skips back to beginning" issue but a botched upgrade on my server means no subsonic at the moment. :cry:

[edit]: Just tested this on the demo server and after about 30 seconds, the first track will stop playing (this is actually worse than skipping to the beginning since it requires user intervention to get going again).

Is there any chance you can get a logcat of when this is happening? I still can't reproduce this issue on my own devices.

Re: 3.6 Beta - Playback fixes

PostPosted: Tue Dec 04, 2012 10:38 pm
by mr_nobody
I don't know. Does logcat require root? The device in question is not rooted.

[edit]: I guess I just need to install an app like catlog? I'll give it a try tonight.

Re: 3.6 Beta - Playback fixes

PostPosted: Tue Dec 04, 2012 11:17 pm
by hyatari
ok, did some testing. my preferred transcoding is flac > ogg with this setting : ffmpeg -v 0 -i %s -f ogg -vn -acodec libvorbis -ar 44100 -aq 3 -ac 2 -map_meta_data 0:0 -

now it just jumps back to beginning of the 1st track shortly after loading the album or sometimes just completely stops playing until you advance to next track manually. the download continues tho. im going to send you a couple logcats labeled flac>ogg and flac>mp3. hope they will help.

Re: 3.6 Beta - Playback fixes

PostPosted: Wed Dec 05, 2012 5:46 am
by daneren2005
Alright it looks like from both sets of logs I got in my email it's getting stuck in a buffer loop which is screwing stuff up. I'll see if I can fix it and post up another Beta tomorrow evening after I trace the cause.

Re: 3.6 Beta - Playback fixes

PostPosted: Thu Dec 06, 2012 6:06 am
by daneren2005
So here goes a second shot. At the very least this should put things back to the point where they were. I also hope this fixes the issue of restarting from the beginning. Take a wak at it and let me know how it works. Like previous email me logs if you can and are still having issues.

Re: 3.6 Beta - Playback fixes

PostPosted: Thu Dec 06, 2012 2:34 pm
by mr_nobody
Now what happens is after playing 30 seconds of the first song, it skips to the second song. Logcat sent. Thanks.

Re: 3.6 Beta - Playback fixes

PostPosted: Thu Dec 06, 2012 7:52 pm
by daneren2005
Grr. Ill look and see if I can find another spot that might be causing that issue. Thanks for the logs.

Sent from my HTC One X using Tapatalk 2

Re: 3.6 Beta - Playback fixes

PostPosted: Fri Dec 07, 2012 5:46 am
by daneren2005
Alrighty then, hopefully third times the charm. Same deal.

Re: 3.6 Beta - Playback fixes

PostPosted: Fri Dec 07, 2012 3:30 pm
by mr_nobody
This one looks like a big improvement. As you said, now there's a brief pause around the 30 second mark of the first track but then everything proceeds as normal. I just tested on a couple random albums on the demo server. Hopefully I'll get my own server back up this weekend and be able to do some more extensive testing. Thanks!

Re: 3.6 Beta - Playback fixes

PostPosted: Fri Dec 07, 2012 4:16 pm
by daneren2005
Well that's good. I'm not sure what I can do to stop that first pause, but at the very least it shouldn't be restarting from the beginning and I'm hoping that now the random stutterings people were experiencing after the file is already buffered will be gone. Anyone else able to test the newest beta who were previously having issues?

Re: 3.6 Beta - Playback fixes

PostPosted: Fri Dec 07, 2012 8:59 pm
by hyatari
brief pauses still occurring flac to mp3 and even just a straight mp3 has a brief pause at times but never restarts at the beginning of the track or jumps to next track so definitely an improvement there. flac to ogg vbr still jumps to beginning of the 1st track less than a minute into the song. also tried flac to ogg abr but same results as vbr. really wish ogg worked better since it allows for good audio quality at lower bitrates/smaller file size to my ears anyhow.

Re: 3.6 Beta - Playback fixes

PostPosted: Sat Dec 08, 2012 12:14 am
by mr_nobody
Got my server back up and running so have done some further testing and discovered an annoying bug that is almost certainly related to the work you've done here. What is happening (and it seems to only happen when the screen is off and pretty consistently then) is a song will finish playing and then rather than going on to the next track, it will skip back about 30 seconds (just guessing, screen is off when it happens) and play the last bit of the song again before moving on to the next track. Anyways, I've rolled back to the current play version for now.

I can reinstall the beta and try to get you a logcat but this is a little trickier since a) screen is off and b) it happens later in the track. Anyways, let me know if you want me to try that.

Re: 3.6 Beta - Playback fixes

PostPosted: Sat Dec 08, 2012 12:21 am
by daneren2005
mr_nobody wrote:Got my server back up and running so have done some further testing and discovered an annoying bug that is almost certainly related to the work you've done here. What is happening (and it seems to only happen when the screen is off and pretty consistently then) is a song will finish playing and then rather than going on to the next track, it will skip back about 30 seconds (just guessing, screen is off when it happens) and play the last bit of the song again before moving on to the next track. Anyways, I've rolled back to the current play version for now.

I can reinstall the beta and try to get you a logcat but this is a little trickier since a) screen is off and b) it happens later in the track. Anyways, let me know if you want me to try that.

Don't worry about it, I know exactly what is causing it. Basically when your player reaches the complete listener it was thinking the position was 0, so I was using the position slider on the screen that was being updated every second to keep track of your position. I didn't realize that it was only running while the screen was on. I will just use a separate thread to keep track of the current position.