Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Keep custom audio speed setting during shutdown/reboot
« previous next »
  • Print
Pages: [1] 2 3

Author Topic: Keep custom audio speed setting during shutdown/reboot  (Read 4433 times)

Offline eugenkss

  • Member
  • *
  • Posts: 22
Keep custom audio speed setting during shutdown/reboot
« on: April 06, 2024, 09:23:14 AM »
I usually listen to podcasts with speeds like 1.25x or 1.5x
And I am happy that we can freely change the audio speed in Rockbox.

However, each time the player boots, the audio speed goes back to 1.00x
Is there any chance to include an option to make the audio speed persistent, so that a custom set audio speed is kept after the player is shut down and restarted the next time?
Like it is e.g. possible already for the sleep timer.
Logged

Offline johnb

  • Member
  • *
  • Posts: 228
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #1 on: April 06, 2024, 12:20:33 PM »
If you bookmark and stop your audiobook, the speed is part of the bookmark, IIRC, thus resumed afterwards.
Logged

Offline eugenkss

  • Member
  • *
  • Posts: 22
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #2 on: April 06, 2024, 03:16:39 PM »
Thank you.
Yes, I know. This is how I currently do it, in conjunction with "Bookmark on Poweroff".

But if the audio speed was persistent, you wouldn't have to execute a bookmark each time on bootup.
You could simply continue to play, instead of "Home, 3x Up, Right, Right"  ;)
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1191
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #3 on: January 15, 2025, 01:58:30 AM »
the pitch plugin pitch_screen.rock takes arguments

first go to settings>General Settings>Startup/Shutdown>Start Screen>Open Plugin

choose Viewers/pitch_screen.rock

now go to Apps/Open Plugins
under Start Screen you should see [pitch_screen.rock]
long press on the entry and choose 'Edit' from the context menu (choose No to browse)


EDIT After today:
choose Yes when asked to set parameter and No when asked to browse for a plugin

under parameter you can use these options
Code: [Select]
/* pitch_screen
 *  accepts args -q, -g, -p=, -s=, -k=; (= sign is optional)
 * -q silences output splash
 * -g runs the gui (DEFAULT)
 * -p100 would set pitch to 100%
 * -s=90 sets speed to 90% if timestrech is enabled
 * -k=true -k1 enables time stretch -k0 -kf-kn disables
so  '-q -p70 -s90' would hide the splash set pitch to 70% and speed to 90'

after saving it you can select the entry again and run it to see if it does what you want

now on startup the pitch will be set

PS. working on a patch to allow you to add a parameter for viewers without going to the plugin
 
« Last Edit: January 15, 2025, 11:56:17 AM by Bilgus »
Logged

Offline bahus

  • Member
  • *
  • Posts: 205
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #4 on: January 15, 2025, 04:30:46 PM »
There is an old patch available for this issue: https://www.rockbox.org/tracker/task/11619.

This patch is integrated into Poretsky's build (though it is not frequently updated): https://poretsky.github.io/rockbox/.

This plugin thing doesn't look to be very convenient for this scenario. You need to remember to set the pitch a second time via the Open Plugin every time you change it. And setting it up is not a straightforward process and requires more than just a few clicks.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1191
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #5 on: January 15, 2025, 09:31:09 PM »
we already have enough issues with nvram that I don't know that I want to add to it
that said the command line is already how it gets set
it'd be just as easy to save it to a cfg file when changed from within the plugin and I guess ask the user if they want it to persist between boots
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1191
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #6 on: January 15, 2025, 09:40:01 PM »
other thing though how often are you wanting to save the pitch anyway esp through reboots?
I'm gonna file this under if not worth it there is the 5 click method they were using.
« Last Edit: January 15, 2025, 10:45:09 PM by Bilgus »
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 161
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #7 on: January 16, 2025, 03:19:02 AM »
Quote from: bahus on January 15, 2025, 04:30:46 PM
... Poretsky's build (though it is not frequently updated): https://poretsky.github.io/rockbox/.

This looks interesting. The change list includes "an option to swap audio channels".

This would be nice for wearing IEMs cable down where L and R become reversed.
Logged

Offline bahus

  • Member
  • *
  • Posts: 205
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #8 on: January 16, 2025, 11:43:08 AM »
Quote from: Bilgus on January 15, 2025, 09:40:01 PM
other thing though how often are you wanting to save the pitch anyway esp through reboots?

Quite often. My player frequently shuts down due to a timeout when I get distracted and leave it paused for 10+ minutes. When I return, I want to resume listening with all my settings intact. I usually set the pitch for audiobooks or reset it for music, so having to adjust it twice isn’t convenient. However, this is just my perspective on the scenario. The ability to provide parameters for plugins is definitely a useful feature.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1191
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #9 on: January 16, 2025, 01:09:58 PM »
if you have an actual use case for it we can implement most of the logic for it in the plugin spit out the .cfg file and make it run on startup if the file exists bypassing open_plugin completely to leave it open for other plugins

its sort of doing this already in the resume bookmarks case I think itd just be a case of checking for the .cfg file
« Last Edit: January 16, 2025, 01:11:35 PM by Bilgus »
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1191
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #10 on: January 16, 2025, 01:27:26 PM »
what I don't want is every time you set the pitch it asks you to apply next restart or prompting to apply at boot when its been set

I'm thinking more of a second menu item like 'set global pitch' or 'pitch persist' and it then stores and applies that at boot

then you could still set an individual track and if bookmarked w/e itd get its own pitch and otherwise set the persistent one
Idk i'll have a look this next day or two
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 787
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #11 on: January 16, 2025, 09:30:21 PM »
Does the fixed.cfg file not have any use for this?
(I can't remember off-hand what attributes can be defined in that)
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1191
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #12 on: January 17, 2025, 03:03:03 AM »
Well what I settled on was making the setting always persist and giving the user a option of "Pitch Reset"
it doesn't re apply the previous speed if you resume a track with different settings but I think that'll be ok
as it'd resume to the previous next boot unless you changed it again


still needs testing

https://gerrit.rockbox.org/r/c/rockbox/+/6344

Logged

Offline bahus

  • Member
  • *
  • Posts: 205
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #13 on: January 17, 2025, 05:12:54 AM »
> and giving the user a option of "Pitch Reset"

There is an action in Pitch screen for this. For me Pitch reset is mapped on long select (don't remember if I mapped it this way or it's default mapping). So separate setting for this looks redundant.

Just curious why you think NVRAM approach is problematic (I personally use custom build with NVRAM setting and I don't see issues with it).
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1191
Re: Keep custom audio speed setting during shutdown/reboot
« Reply #14 on: January 17, 2025, 11:32:04 AM »
the reset is important otherwise you'll get a user stuck in pitch and unable to figure out how to change it
I think I might make it blank if the pitch is normal but I'm not sure I can without trouble

Quote
There is an action in Pitch screen for this
plus that reset requires running the plugin

Its either that or you get asked to set next boot or asked at boot to reset, or you have a setting to find in the plugin
or a setting in the playback menus
I'm not doing the latter in fact I'd like to get rid of half the current settings due to the massive bin size for them

All of those have some downside to (someone)

Edit:
Nvram is emulated on most ALL targets so its not buying you anything except an opaque (non plaintext) way to write numbers to the disk but causes crashes when it gets corrupted or out of sync and who knows about the one device that actually has real NVRAM
we now have no devices using real NVRAM (requires HAVE_RTC_RAM) it was one of the SW HW codec targets I'm guessing


Quote
Pitch reset is mapped on long select
for you yes but what about the other 30+ devices
and less savvy users?

« Last Edit: January 17, 2025, 06:15:12 PM by Bilgus »
Logged

  • Print
Pages: [1] 2 3
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Keep custom audio speed setting during shutdown/reboot
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.08 seconds with 18 queries.