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.tar.gz
rockbox-9e9da94b714dc3108bd06366e5f15f53602a0f08.zip
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 e7e8d33ad8..712c7d18f4 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)
53 #define MAX_RIGHT_L 57 53 #define MAX_RIGHT_L 57
54 #define MAX_RIGHT_R 111 54 #define MAX_RIGHT_R 111
55 55
56 #define MAX_PEAK 0x8FFF 56 #define MAX_PEAK 0x7FFF
57 57
58 left_needle_top_x = 58 left_needle_top_x =
59 (rb->mas_codec_readreg(0xC) * 59 (rb->mas_codec_readreg(0xC) *
@@ -83,7 +83,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
83 rb->lcd_drawline(1, 53, 112, 53); 83 rb->lcd_drawline(1, 53, 112, 53);
84 84
85 /* These are the needle "covers" - we're going for that 85 /* These are the needle "covers" - we're going for that
86 "old fasioned" look */ 86 "old fashioned" look */
87 87
88 /* The left needle cover - organized from the top line to the bottom */ 88 /* The left needle cover - organized from the top line to the bottom */
89 rb->lcd_drawline(27, 48, 29, 48); 89 rb->lcd_drawline(27, 48, 29, 48);
@@ -102,10 +102,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
102 102
103 rb->lcd_update(); 103 rb->lcd_update();
104 104
105 switch (rb->button_get(false)) 105 /* We must yield once in a while to make sure that the MPEG thread
106 isn't starved, but we use the shortest possible timeout for best
107 performance */
108 switch (rb->button_get_w_tmo(HZ/HZ))
106 { 109 {
107 case BUTTON_OFF: 110 case BUTTON_OFF:
108 return false; 111 return PLUGIN_OK;
109 } 112 }
110 } 113 }
111} 114}