Rockbox Technical Forums

Support and General Use => User Interface and Voice => Topic started by: Burrhus on November 30, 2016, 06:37:24 PM

Title: [Solved] Shortcut to set volume
Post by: Burrhus on November 30, 2016, 06:37:24 PM
Hi everyone.

I own a nice player I was stupid enough to immerse in water. Stupid me.

I disassembled it, dried it, reassembled it, revived it. Except for the volume up button which I happen to destroy in the reassembling process. Supid stupid me.

But, lucky me, my device is RockBoxed. Through the menu, I can go to [Settings // Sound settings // Volume] and pick the volume I want. The RockBox firmware is terrific, and it's definitely a device-saver !!! I can't thank you enough, guys !!!!

Now, in order to optimize my use of my device from the pocket, I have set useful shortcuts. I would like to have a shortcut setting the volume to a given level. Hence, in my [shortcuts.txt] file, I added the following lines :

[shortcut]
type: setting
data: volume -6
name: Volume Max


I took my informations from here :
https://download.rockbox.org/daily/manual/rockbox-sansaclipzip/rockbox-buildch5.html#x7-1000005.14
https://download.rockbox.org/daily/manual/rockbox-sansaclipzip/rockbox-buildap5.html#x20-428000E

But this sortcut doesn't even show in the shortcuts list.

I don't know what I did wrong, and I would appreciate very much any help.

Thanks in advance,
Burrhus.
Title: Re: Shortcut to set volume
Post by: johnb on December 02, 2016, 02:25:50 AM
Rather create a .cfg file with that volume setting and then a shortcut pointing to that .cfg file.
Title: Re: Shortcut to set volume
Post by: Burrhus on December 02, 2016, 09:28:39 PM
Thank you for your advice, johnb.

Digging in this direction, I may find what I look for.

Burrhus.
Title: Re: Shortcut to set volume
Post by: johnb on December 03, 2016, 04:08:20 AM
Now that I have my player at hand, my sample config file "S_Neutral" (you might remove all but the volume line):
Code: [Select]
# .cfg file created by rockbox f5b7134M-130410 - http://www.rockbox.org

volume: -41
balance: 0
bass: 0
treble: 0
channels: stereo
stereo_width: 100
replaygain type: track shuffle
replaygain noclip: on
replaygain preamp: 0
crossfade: off
crossfade fade in delay: 0
crossfade fade out delay: 0
crossfade fade in duration: 2
crossfade fade out duration: 2
crossfade fade out mode: crossfade
crossfeed: meier
dithering enabled: off
timestretch enabled: on
eq enabled: off

and the corresponding section in shortcuts.txt:
Code: [Select]
[shortcut]
type: file
data: /.rockbox/S_Neutral.cfg
name: S_Neutral
Title: Re: Shortcut to set volume
Post by: Burrhus on December 03, 2016, 07:19:28 AM
Nope.  :(

I have tried various things, with very mixed result, none being what I expect.

I can
- make a very convenient cfg file, perfect ;
- test it buy loading it, perfect ;
- create the shortcut by summoning the context menu while browsing the .cfg files, perfect.

Then when I summon the shortcut, my device freezes.

Same result with your items, copied and pasted.

If I make something lighter, by writing the code lines in the .cfg file, and the shortcuts.txt file with Notepad++ for example, sometimes the shortcut doesn't finds the .cfg file, sometimes the shortcut doesn't shows in the shortcuts list.

The best I can do is having a shortcut pointing to the volume settings, avoiding me to venture in the menus :
[shortcut]
type: setting
data: volume -6
name: Volume


Your advice, johnb, and your files, proved me the problem is not in RockBox, nor in my works. Elsewhere, then.

I may now confess I happen to be a kind of RockBox dissident. I mean : my device is a XDuoo X3, and the RockBox Firmware I use is an unofficial port made out of the RB Legacy. I easily understand the firmware I use may have some bugs. Actually, there are some that many XDuoo X3 users constantly mess with. My problem may come for the very RockBox/device combination I use.

Anyhow, a defective RockBox is still a wonderful improvment over most official firmwares. And, as my last Clip Zip lost his jack, I had to find a modern device playing RockBox. Despite all the bugs, I'm mostly satisfied with the XDuoo.

I am looking forward for the official port to this device that was announced. Meaningwhile, my shortcut will be enough.

Thanks again, johnb.

Burrhus
Title: Re: [Solved] Shortcut to set volume
Post by: johnb on December 03, 2016, 09:27:06 AM
I owned an Xduoo X3 for two months and the same approach worked (with the latest rockbox build from xvortex).
The copy I pasted above was from a clip+ though. You might have to tweak the path in the shortcut.txt file due to the 2 sdcards.

I will check later if I still have my xduoo settings somewhere.
Title: Re: [Solved] Shortcut to set volume
Post by: Burrhus on December 03, 2016, 06:54:30 PM
I won't give up. Although the shortcut to the volume setting does the trick, I still would be happy to have a shortcut to a specific volume level.

The path to the .cfg file in the shortcuts.txt may be an issue :
- if I code it by hand, I never manage to reach the .cfg file by using the shortcut.
- if I let rockbox modify the shortcuts.txt, it makes a shortcut to the very .cfg file I point to, and I can use the shortcut. However, two possibilities.
-  - I can use the .cfg file sample you provided. Or I can use my main configuration file, with the volume setting modified accordingly to my wishes. Then using the shortcut freezes the XDuoo. And the modification of the shortcuts.txt empties the values of the other working shortcuts (activate sleep mode for 30 mins, or deactivate sleep mode)  I have.
-  - I can use a .cfg file with only the volume setting, by writing it, by using your .cfg file sample and removing the unneeded lines. The result is the same, it give me access to the sound settings (all the sounds settings, not the volume settings).

Once upon a time, I had another trouble with the shortcuts.txt, for RockBox seemed to prefer linux type textfile (lines ending with <LF>) to Windows type textfiles (lines ending with <CR><LF>). But the problem is solved in RockBox code since 2012, and changing the type of the line ending seems to have no effect on my issue.

http://forums.rockbox.org/index.php/topic,33535.msg195494.html#msg195494

I don't give up. For the pleasure of fine tuning, I'm looking for a complete solution. And I would be glad you would provide a working one. But for the use of my device, I consider myself having a working solution.

Thanks johnb,
Burrhus
Title: Re: [Solved] Shortcut to set volume
Post by: johnb on December 04, 2016, 02:17:21 PM
I am sorry, it seems I have not made any backup of my .rockbox directory before I sold the X3.