Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: [patch] volume peak meter in wps
From: Philipp Pertermann (philipp.pertermann_at_web.de)
Date: 2002-09-17


Put the tag %pm into your *.wps file and voila: you've got a
volume peak meter in your wps. In the menu General
settings -> Display -> Peak meter you can find an option
where you can adjust the release time. That specifies how
long a peak value is kept before it is reset.

About the patch:
For a long time I fiddled with threads for updating the peak
meter. Although that would have lead to less system load I
dropped that idea because it messed up the existing drawing
concepts.
In order to achieve acceptable 'frame rates' I had to do a
dirty trick in wps_show: instead of button_get_w_tmo with a
long time I call it now repeatedly in a loop with a short
time. That enabled me to do the refresh of the peak meter. I
don't like it. This thing does more than it has to and it's
called _really_ often. But maybe it's less awful than a new
thread running amok by updating the volume bar without
knowing what screen is being displayed.

And another thing:
I didn't dare to use precious rtc space to make the peak
meter release setting persistent. But if I get an ok from
somebody who is willing to commit it, that can be changed.

Do we want a little extra peak meter in the status bar? I've
done something that displays a 2 pixel wide (l/r) and 8
pixel high peak meter in the status bar. It looks nice but
it's still threaded and thus uncommitable. If nobody needs
it I won't bother with that idea any more.

Phil



  • application/octet-stream attachment: docs.diff


  • application/octet-stream attachment: apps.diff




Page was last modified "Jan 10 2012" The Rockbox Crew
aaa