summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2003-11-10 22:00:27 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2003-11-10 22:00:27 +0000
commit9e9da94b714dc3108bd06366e5f15f53602a0f08 (patch)
tree0a27b75f658ea6a4aec0a75595d2d547cef7d8ad /apps/plugins
parentd9d63560fe8bbb637c60948f7b51817aa1ad1263 (diff)
downloadrockbox-9e9da94b714dc3108bd06366e5f15f53602a0f08.zip
rockbox-9e9da94b714dc3108bd06366e5f15f53602a0f08.tar.gz
rockbox-9e9da94b714dc3108bd06366e5f15f53602a0f08.tar.bz2
rockbox-9e9da94b714dc3108bd06366e5f15f53602a0f08.tar.xz
VU meter no longer starves the mpeg thread, and now uses a correct maximum level for the scaling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4028 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/vu_meter.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index e7e8d33..712c7d1 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -53,7 +53,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#define MAX_RIGHT_L 57
#define MAX_RIGHT_R 111
- #define MAX_PEAK 0x8FFF
+ #define MAX_PEAK 0x7FFF
left_needle_top_x =
(rb->mas_codec_readreg(0xC) *
@@ -83,7 +83,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->lcd_drawline(1, 53, 112, 53);
/* These are the needle "covers" - we're going for that
- "old fasioned" look */
+ "old fashioned" look */
/* The left needle cover - organized from the top line to the bottom */
rb->lcd_drawline(27, 48, 29, 48);
@@ -102,10 +102,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->lcd_update();
- switch (rb->button_get(false))
+ /* We must yield once in a while to make sure that the MPEG thread
+ isn't starved, but we use the shortest possible timeout for best
+ performance */
+ switch (rb->button_get_w_tmo(HZ/HZ))
{
case BUTTON_OFF:
- return false;
+ return PLUGIN_OK;
}
}
}