 Status Closed
 Percent Complete
 Task Type Bugs
 Category User Interface → Themes
 Assigned To Noone
 Operating System All players
 Severity Low
 Priority Very Low
 Reported Version Daily build (which?)
 Due in Version Undecided

Due Date
Undecided
 Votes
 Private
FS#7441  Volume is not correctly computed when using %?pv instead of %pv
The volume is not “translated” correctly if you use %?pv. The current formula, obtained from the source code, is:
(Number of slots in conditional  3) * (volume  MAXVOLUME)  + 2 MAXVOLUME  MINVOLUME
Since any level above 0dB is forced to use the last slot in the conditional, 0dB is forced to use the nexttolast and MINVOLUME is forced to use slot 1, the formula is not right. For example, the iAudioX5 has MAXVOLUME 6, MINVOLUME 73, so the formula will be:
(N3) * (vol + 73)
—————— +2
79
Thus, if N=80 (for 1:1 correspondence between different dB values including 0 and slots), the max slot used will be:
77 * (72)
——— + 2 = 72, and it should be 78
79
If we take into account the “forced” slots, then N=75, and the max slot used will be:
72 * (72)
——— + 2 = 67, and it should be 73
79
A correct formula can be this:
(N3) * (vol  MIN  1)
———————– + 2
 1  MIN
Any other formula in the form y=mx+b can be used to map the dB values to the slots in the conditional, as long as m is calculated as “Number of slots in the conditional  3) / (real dB steps to map, ignoring the forced values that won’t be EVER mapped by this function)”. The one presented above is the first I’ve thought of, and of course it can be improved so it is computed faster. I have a quick’n’dirty test that shows the mappings for an iAUDIO, written in shell script (ouch!).
Please contact me if you want a patch instead of this.
Raúl Núñez de Arenas Coronado
20070723 17:11
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
The proposed fix is in SVN. Thanks for
the detailed report :)
Loading...
Available keyboard shortcuts
 Alt + ⇧ Shift + l Login Dialog / Logout
 Alt + ⇧ Shift + a Add new task
 Alt + ⇧ Shift + m My searches
 Alt + ⇧ Shift + t focus taskid search
Tasklist
 o open selected task
 j move cursor down
 k move cursor up
Task Details
 n Next task
 p Previous task
 Alt + ⇧ Shift + e ↵ Enter Edit this task
 Alt + ⇧ Shift + w watch task
 Alt + ⇧ Shift + y Close Task
Task Editing
 Alt + ⇧ Shift + s save task