Jump to content

Remember playback positions in tracks


Vampyr

Recommended Posts

Yes, this will most likely be caused by the USB device not being initialised before PA starts scanning the folders for any new music (or before it tries to load any saved track). Thus PA thinks this is a 'new' scanned item, not the same file as before. You could try turning all the auto-scanning features off and see if that helps. 

Andre

Link to comment
Share on other sites

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 4/8/2019 at 4:12 PM, andrewilley said:

Yes, that's how PA works by default. The current track and its playback position are remembered even if you exit the app, close it, or even reboot your phone. This has been standard form day one, and has nothing to do with the relatively new option to permanently save the position of longer tracks and return to them some time late (even if you've played other music in the meantime).

Andre

In my experience with PA V3 build 828, the 'Store/Restore Per Track Progress' feature will not function as expected if you restart or shut down and power up your phone.
Refer to this thread for details on my issue:

What I found is this:
In order for PA to remember track progress when returning to a long track - after having listened to another track - you must indeed pause the long track and listen to another track.
If you simply pause the long track, then close PA (or not) and restart your phone, it will return to the beginning of the long track. ** keep reading this post for clarification on this ***
So it appears that the track position is being written to the storage on the phone only when you switch to another track.

Here is another scenario:
You are listening to a long track, and have Store/Restore Per Track Progress enabled.
You are 30 minutes through a 60 minute track. You hit pause, and listen to something else on PA.
With or without restarting your phone, you later resume playing the long track. PA will remember where you were, and restart the track at 30 minutes - the position you were at when  you paused it.
Now, let's say you listen to another 15 minutes of the long track - so you're now at 45 minutes.
For some reason, you need to reboot your phone. You do not leave the long track to listen to anything else before closing PA (actually, it makes no difference if you close PA or not) and rebooting your phone.
You restart your phone, and open PA. Sure enough, the long track you were listening to is up as the current track. But when you press play, you find that it begins playing from the 30 minute position you were at before you paused it to listen to that other track, not the 45 minute position you were at before you rebooted your phone.
I believe this is a bug, or maybe just an oversight by the developers. For whatever reason, PA only writes the Per Track position into storage (non-volatile memory) when the long track is paused and another track is selected, but not when the track is only paused, and no other track is selected.

That said, if you simply pause the long track (or any track, long or short) and close PA - but do not restart your phone - then return to PA and resume playing the same track, it will begin play at the point you left off. This, as has been stated here, has nothing to do with Per Track Progress.

Link to comment
Share on other sites

Poweramp saves position when it's paused/stopped (normally). If there is sudden poweroff / app kill it's not possible to store position, unfortunately.

Also, some tracks can't be seeked precisely due to (for example) VBR + missing seek table or broken seek table. Poweramp implements fast seek (that is, it can seek files fast and accurately provided seek table exists and correct, or files are CBR), as doing full file decoding just to accurately seek is not battery friendly (esp. for long files).

Link to comment
Share on other sites

9 hours ago, maxmp said:

as doing full file decoding just to accurately seek is not battery friendly (esp. for long files).

Might be worth making this (another) option? "Attempt Accurate Seek (may consume extra battery)" for example? A lot of longer tracks are likely to be things like podcasts/etc where the user has no control over the encoding, and where seek accuracy can drift by several minutes (such as the fairly extreme example I gave before, http://traffic.libsyn.com/alohomora/Alohomora_Cursed_Child_NYC_Earth_One_and_Earth_Two.mp3 )

Andre

Link to comment
Share on other sites

  • 2 years later...

I have Poweramp in an Android car unit. It works fine, with one exception: when it starts after the car has been turned off it goes back to the beginning of the song it was playing. This is annoying because we live in a small town where most drives are short, and we normally listen to live albums with some long tracks (15~20 minutes) that last longer than most drives, so that if we don't manually do something the same track can keep playing for a long time. I couldn't find a way to solve it. 

I bought and installed the app a few weeks ago.

 

Link to comment
Share on other sites

@Fabiovp PA always stores the playback position of the current track when you exit the player and return to it later. This even survives a normal Android reboot.

However there is a recurring issue with car head-units - especially some of the no-name Chinese models - which either don't issue a standard shutdown intent, or they simply shut the power down without allowing apps to tidy up and save their configuration before they exit.

If you can find the specific shutdown intent generated by your device (their tech support or forum may be able to help?) you can enter it into PA Settings > Misc > Shutdown Intent.

Andre

Link to comment
Share on other sites

  • 2 weeks later...

@Fabiovp I presume that PA stores the 'currently playing track' data when the track is loaded (when you select a track, or when it auto-advances). However the precise counter location (for later resuming) is not saved during normal background playback, but only when the app stops/pauses/exits. To test this, you could try manually pausing playback a few seconds before you turn the car ignition off and see if that helps.

Andre

Link to comment
Share on other sites

11 hours ago, andrewilley said:

@Fabiovp I presume that PA stores the 'currently playing track' data when the track is loaded (when you select a track, or when it auto-advances). However the precise counter location (for later resuming) is not saved during normal background playback, but only when the app stops/pauses/exits. To test this, you could try manually pausing playback a few seconds before you turn the car ignition off and see if that helps.

Andre

That makes sense. 

But there's definitely something wrong with this app. If I close it manually and open it again without powering off the unit it still doesn't save the right position. But you are right, if I manually pause it before shutting down the unit it returns to the point where it was paused.

Before buying Poweramp I bought another music player app, n7player. This app returns to the exact song and exact location even after power off. The problem with it is that it takes foverer to start, and crushes very frequently. It also doesn't start playing the song automatically, I have to press the 'button', but that's the smallest problem.

So n7player is able to detect the shutdown/app close notification, but Poweramp isn't.

The music app that comes with the unit is fast and always restarts from the right point, but other than that it is absolutely ridiculous. Completely unusable.

So maybe I'll have to keep looking for some app that will work as expected.

Thank you for your help.

 

Link to comment
Share on other sites

When you mention that If you "close PA manually" it doesn't later resume, what do you mean? If you press Home or Back to exit, I would expect PA to continue playing in the background, not shutdown, so position saving is not needed anyway.

It's possible that N7 saves its playback position multiple times during playback. @maxmp might doing this be a possibility (even if it creates a performance overhead) to counter this sort of issue for devices which don't issue standard shutdown intents?

Andre

Link to comment
Share on other sites

16 hours ago, andrewilley said:

When you mention that If you "close PA manually" it doesn't later resume, what do you mean? If you press Home or Back to exit, I would expect PA to continue playing in the background, not shutdown, so position saving is not needed anyway.

@Andre, what I mean by "close manually" is that I click on an icon on the top right of the screen that makes all apps that are running appear as small boxes in a vertical line, and then slide PA out of that list, what makes it to stop running. It's the equivalent of double pressing the iPhone button. So I guess when that happens Android sends an intent to the app that is being closed, and PA doesn't understand that intent.

I didn't find anything online about my unit's intents. Is it possible to somehow find that information on the unit itself? I guess not...

 

Link to comment
Share on other sites

20 hours ago, Fabiovp said:

But there's definitely something wrong with this app.

Poweramp works as expected by design. It is the hardware implementation of Android in some car units that is out of the norm. The system designers of your model have taken some measures with their media player to avoid shutdown issues, but as you have stated the rest of the functions are poor to unusable. This is evident from other reports from users with similar systems using some modified Android version for the OS.

This happens with car units in other areas too, not just with Android and other apps. Maybe @maxmp can come up with a work-around at some point for PA?

Link to comment
Share on other sites

1 hour ago, Fabiovp said:

what I mean by "close manually" is that I click on an icon on the top right of the screen that makes all apps that are running appear as small boxes in a vertical line, and then slide PA out of that list

That basically force-closes an app. If it sends a shutdown intent first, to ask the app to close nicely, then it's obviously not sending anything that PA understands. Can you contact the tech support for the manufacturer and ask them? It won't be something that first-line can help with though.

@maxmp is there any way to create a quick-and-dirty test app to watch for this sort of intent and somehow let the user know the details?

Andre

Link to comment
Share on other sites

3 hours ago, Fabiovp said:

@MotleyG , I guess you're right.

This  one is not the "main" car of the family and it's quite old, so I didn't want to spend much money on a head unit. I guess you get what you paid for... 

 

It is unfortunate that it isn’t clear when you buy these that there are limitations, the manufacturers only state they use Android. Google should enforce a minimum standard of expectations for using their OS.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...