Rockbox

Tasklist

FS#4871 - peakmeter margins and height

Attached to Project: Rockbox
Opened by Matthias Mohr (aka Massa) (mmohr) - Tuesday, 21 March 2006, 08:57 GMT
Last edited by Matthias Mohr (aka Massa) (mmohr) - Wednesday, 28 May 2008, 06:30 GMT
Task Type Patches
Category Themes
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The following patch extends the possibility for the peakmeter WPS tag (%pm)
It enables the same margin functionality as it already exists for the progressbar.

So the new extended syntax is as follows:
%pm|<height>|<start>|<end>|

height is the height of the peakmeter; minimum height is 4 - default is 12.
start is the X position where the peakmeter starts
end is the X position where the peakmeter ends

All of the additional parameters are optional and may also be empty
e.g. %pm||100|200|
This produces a peakmeter starting at 100, ending at 200 with the default height of 12.
Of course the old format of just %pm is still possible...
--> if you don't use the new parameters, it works as it did ==> 100% compatible to current code!

The patch should work at all platforms where the peakmeter is already supported...

Please tell me if there are issues - I'll fix them ASAP!
I hope the functionality will find its way to the CVS for v3.0 ;) !
This task depends upon

Closed by  Matthias Mohr (aka Massa) (mmohr)
Wednesday, 28 May 2008, 06:30 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Viewports are now done - so this patch is no longer necessary...
Comment by Matthias Mohr (aka Massa) (mmohr) - Sunday, 26 March 2006, 00:18 GMT
Synced patch with today's CVS (2006-03-26)
Comment by fabrice dussapt (gaston) - Saturday, 01 April 2006, 18:02 GMT
hi Matthias,

i just start trying to use your patch (great!)
it seems there is a bug:
my irock wps (carbon or white) displays covert art from X=1 to X=101, then on the right i programmed peakmeter from X=105 to X=217
=> when no cover art is available, i can see blinking dots (pixels) on the line between two peakmeter bars
can you help ?
Comment by fabrice dussapt (gaston) - Saturday, 01 April 2006, 18:03 GMT
precision: in place of cover art...
Comment by Matthias Mohr (aka Massa) (mmohr) - Saturday, 01 April 2006, 19:28 GMT
I also noticed that - it has nothing to do with cover art.
Even if you don't add the album art patches it will show you
strange spots between the lines and all over the line
(does not matter which margins you choose - it's always over the whole line)

And I have no idea where the spots come from.
I assume this is a bug of the internal API function peak_meter_draw which I indirectly use.
But I don't know for sure...


Comment by Matthias Mohr (aka Massa) (mmohr) - Sunday, 02 April 2006, 17:24 GMT
O.K. the dots between the lines are not a bug - they are a feature :)
They show the scaling for the peakmeter bars.

But they have a bug:
They don't take respect of the x offset as the peakmeter bars itself do.
I fixed this bug here:
http://www.rockbox.org/tracker/task/4999

So you need first to add the bugfix-patch and then the patch above
for the peakmeter margins...
Comment by fabrice dussapt (gaston) - Sunday, 02 April 2006, 18:10 GMT
you're toooooooooo much !
great!
Comment by fabrice dussapt (gaston) - Sunday, 02 April 2006, 18:21 GMT
did you ear of that : http://www.rockbox.org/tracker/task/1644/edit

may it be possible that you integrate it in your patch, as it seems that the owner of the original did nothing since 01/2004...
Comment by Matthias Mohr (aka Massa) (mmohr) - Monday, 03 April 2006, 08:28 GMT
The mentioned bugfix (task #4999) of the dots has found its way to CVS.
--> it's no longer needed to apply it...

About the "redzone": in principle I like the idea - the patch itself
would work for grayscale devices, but I think much more work should be
done to make it correctly work and also to make it work for coloured
devices.
And I assume that after v3.0 the whole peakmeter code needs to be
changed --> I don't want to make bigger changes now...
Comment by Linus Nielsen Feltzing (linusnielsen) - Wednesday, 05 April 2006, 13:57 GMT
Here's an update for CVS 20060405. I hope I didn't break anything.
Comment by Linus Nielsen Feltzing (linusnielsen) - Wednesday, 05 April 2006, 14:28 GMT
Another fix that uses the correct display width instead of LCD_WIDTH.
Comment by Matthias Mohr (aka Massa) (mmohr) - Wednesday, 05 April 2006, 14:57 GMT
Thanks for synching it.
but I think, display->height and display->width should be used
instead of LCD_WIDTH and LCD_HEIGHT (this should make it possibe
to use it at remote screens, too)

I produced a new patch which changes this...
Comment by Matthias Mohr (aka Massa) (mmohr) - Wednesday, 05 April 2006, 15:03 GMT
Ooops - I didn't see your fix...

But you still missed a LCD_WIDTH, so mine is more complete ;)
Comment by Matthias Mohr (aka Massa) (mmohr) - Monday, 24 April 2006, 06:26 GMT
Here's an update for today's CVS (20060424).
Comment by Matthias Mohr (aka Massa) (mmohr) - Thursday, 31 August 2006, 16:33 GMT
Another sync to today's CVS...

Loading...