Rockbox General > Rockbox General Discussion
Automatic playback on startup
gaugino:
Bilgus,
thank you for your help and for the suggestion!
Unfortunately, I am not sure I have enough skills to make a patch. I am rather tech savvy, so it is not difficult for me to write my own WPS, etc. However, I am not a programmer, so it will take a large amount of time just to understand how to deal with Rockbox...
If the problem can not be solved just by changing some settings or by simple editing of the configuration files, I will choose the "Main Menu" option for the Start Screen, it is the simplest (and not the worst) solution.
Once again thank you for the help!
Bilgus:
It really wasn't hard to add the functionality here is the diff file
--- Code: ------ /home/ubuntu/Desktop/orig/rockbox/apps/gui/wps.c 2016-10-27 01:50:12.388048590 +0200
+++ apps/gui/wps.c 2017-08-24 04:58:50.798515757 +0200
@@ -1213,6 +1213,9 @@
state->paused = false;
if(audio_status() & AUDIO_STATUS_PLAY)
{
+ if(global_settings.start_in_screen == 0 && state->id3 == NULL)
+ audio_pause(); /*If there was no current track pause playback*/
+
state->id3 = audio_current_track();
state->nid3 = audio_next_track();
}
--- End code ---
basically all this does is checks if start_in_screen == previous screen and if there wasn't a track already loaded
and below are precompiled firmware for the clip+ and clipzip based on the current HEAD of the dev builds with the functionality you asked for added
http://www.mediafire.com/?bjp1te1et1t2h <--Updated
Really this needs to be controlled by a setting before it is perfect but I'll leave that as an exercise for you
gaugino:
Dear Bilgus,
thank you very much for the help! I very much appreciate that you spent your time to create the build especially for me!
I just installed the build on my Clip Zip (unfortunately, Clip+ is not with me, so I am unable to test the build for Clip+), reset all the settings (just in case) and choose "Previous Screen" for Start Screen. Unfortunately, the player still starts playback automatically after power up... Maybe it is a feature of the Sansa players that overrides the changes in the Rockbox that you have made?
Bilgus:
no it's probably that the clipzip takes longer to startup than the clip+ which is what I tested it on, I'll see what I can do and update the post above; Update, Ok it should work for you now
Now lets talk about caveats, since we are no longer going on lasttime, it may not be exactly what you desired since anytime there is not a track loaded it will go into the WPS and you will have to press PLAY to get it to start but this is about as good as you're going to get without running some test code for me
gaugino:
Dear Bilgus,
now everything works perfectly, this is exactly what I need! I will also install this build on my father's Clip Zip and, as soon as I get my old Clip+ (it is not with me now, but I will get it again in 1-2 weeks), I will install the build on the Clip+ too.
As for the caveat, it is not a problem for me to press PLAY one more time in the situation with no track loaded - the advantages of this build outweigh this small drawback (at least for me).
Once again thank you very much for your help and efforts!!! If you ever need to test a code on Clip Zip, I am ready to help you.
PS: maybe a very naive and incorrect question, but what if not to use lasttime equal to 0, but to use a condition like lasttime<1-2sec or a parameter (if exists) like runtime<1-2sec (or a time which is necessary to rockbox to load if 1-2 sec is not enough)?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version