Rockbox

Tasklist

FS#12100 - Track length in seconds

Attached to Project: Rockbox
Opened by dave t (sockbox) - Thursday, 05 May 2011, 22:40 GMT
Last edited by Dominik Riebeling (bluebrother) - Sunday, 05 June 2011, 11:06 GMT
Task Type Patches
Category Themes
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.8.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch displays the track length in seconds using a custom WPS tag, %pz.

The idea behind this tag is to use the track length in a conditional statement.

What I want to do is to determine the length of a song and change the font size to accommodate for the additional text. This will be useful when handling smaller resolution players such as the Sansa Clip.

ie. I want to find out if a track is longer than 10 minutes.
%?if(%pz, <, 600)<%Vd(a)|%Vd(b)>

Viewports a & b will define the font output.

The patch works if you just want to display the track length in seconds (%pz). But I cannot get it to work correctly with any values in the conditional statement above. The value does not seem to be interpreted as an integer.
This task depends upon

Closed by  Dominik Riebeling (bluebrother)
Sunday, 05 June 2011, 11:06 GMT
Reason for closing:  Rejected
Additional comments about closing:  no real name
Comment by Jonathan Gordon (jdgordon) - Thursday, 05 May 2011, 23:01 GMT
why are you do time/1000 for the display but not for the *intval?
Comment by dave t (sockbox) - Thursday, 05 May 2011, 23:09 GMT
To tell you the truth, I'm not a C programmer. I just copied & pasted the code from another part of the file.

I'm hoping for some input into how to make it work correctly.
Comment by dave t (sockbox) - Thursday, 05 May 2011, 23:30 GMT
Thanks for the tip. Looks to be working now.

Loading...