1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2003 Lee Pilgrim
11 * All files in this archive are subject to the GNU General Public License.
12 * See the file COPYING in the source tree root for full license agreement.
14 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
15 * KIND, either express or implied.
17 **************************************************************************/
19 #include "fixedpoint.h"
21 #if defined(HAVE_LCD_BITMAP)
25 /* variable button definitions */
26 #if CONFIG_KEYPAD == RECORDER_PAD
27 #define VUMETER_QUIT BUTTON_OFF
28 #define VUMETER_HELP BUTTON_ON
29 #define VUMETER_MENU BUTTON_F1
30 #define VUMETER_MENU_EXIT BUTTON_F1
31 #define VUMETER_MENU_EXIT2 BUTTON_OFF
32 #define VUMETER_UP BUTTON_UP
33 #define VUMETER_DOWN BUTTON_DOWN
35 #elif CONFIG_KEYPAD == ARCHOS_AV300_PAD
36 #define VUMETER_QUIT BUTTON_OFF
37 #define VUMETER_HELP BUTTON_ON
38 #define VUMETER_MENU BUTTON_F1
39 #define VUMETER_MENU_EXIT BUTTON_F1
40 #define VUMETER_MENU_EXIT2 BUTTON_OFF
41 #define VUMETER_UP BUTTON_UP
42 #define VUMETER_DOWN BUTTON_DOWN
44 #elif CONFIG_KEYPAD == ONDIO_PAD
45 #define VUMETER_QUIT BUTTON_OFF
46 #define VUMETER_HELP_PRE BUTTON_MENU
47 #define VUMETER_HELP (BUTTON_MENU | BUTTON_REL)
48 #define VUMETER_MENU_PRE BUTTON_MENU
49 #define VUMETER_MENU (BUTTON_MENU | BUTTON_REPEAT)
50 #define VUMETER_MENU_EXIT BUTTON_MENU
51 #define VUMETER_MENU_EXIT2 BUTTON_OFF
52 #define VUMETER_UP BUTTON_UP
53 #define VUMETER_DOWN BUTTON_DOWN
55 #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
56 (CONFIG_KEYPAD == IRIVER_H300_PAD)
57 #define VUMETER_QUIT BUTTON_OFF
58 #define VUMETER_HELP BUTTON_ON
59 #define VUMETER_MENU BUTTON_SELECT
60 #define VUMETER_MENU2 BUTTON_MODE
61 #define VUMETER_MENU_EXIT BUTTON_SELECT
62 #define VUMETER_MENU_EXIT2 BUTTON_OFF
63 #define VUMETER_UP BUTTON_UP
64 #define VUMETER_DOWN BUTTON_DOWN
66 #define VUMETER_RC_QUIT BUTTON_RC_STOP
68 #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \
69 (CONFIG_KEYPAD == IPOD_3G_PAD) || \
70 (CONFIG_KEYPAD == IPOD_1G2G_PAD)
71 #define VUMETER_QUIT BUTTON_MENU
72 #define VUMETER_HELP BUTTON_PLAY
73 #define VUMETER_MENU BUTTON_SELECT
74 #define VUMETER_MENU_EXIT BUTTON_SELECT
75 #define VUMETER_MENU_EXIT2 BUTTON_MENU
76 #define VUMETER_UP BUTTON_SCROLL_FWD
77 #define VUMETER_DOWN BUTTON_SCROLL_BACK
79 #elif (CONFIG_KEYPAD == GIGABEAT_PAD)
80 #define VUMETER_QUIT BUTTON_POWER
81 #define VUMETER_HELP BUTTON_A
82 #define VUMETER_MENU BUTTON_MENU
83 #define VUMETER_MENU_EXIT BUTTON_MENU
84 #define VUMETER_MENU_EXIT2 BUTTON_POWER
85 #define VUMETER_UP BUTTON_UP
86 #define VUMETER_DOWN BUTTON_DOWN
88 #elif (CONFIG_KEYPAD == SANSA_E200_PAD)
89 #define VUMETER_QUIT BUTTON_POWER
90 #define VUMETER_HELP BUTTON_REC
91 #define VUMETER_MENU BUTTON_SELECT
92 #define VUMETER_MENU_EXIT BUTTON_SELECT
93 #define VUMETER_MENU_EXIT2 BUTTON_POWER
94 #define VUMETER_UP BUTTON_SCROLL_FWD
95 #define VUMETER_DOWN BUTTON_SCROLL_BACK
97 #elif (CONFIG_KEYPAD == SANSA_C200_PAD)
98 #define VUMETER_QUIT BUTTON_POWER
99 #define VUMETER_HELP BUTTON_REC
100 #define VUMETER_MENU BUTTON_SELECT
101 #define VUMETER_MENU_EXIT BUTTON_SELECT
102 #define VUMETER_MENU_EXIT2 BUTTON_POWER
103 #define VUMETER_UP BUTTON_VOL_UP
104 #define VUMETER_DOWN BUTTON_VOL_DOWN
106 #elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
107 #define VUMETER_QUIT BUTTON_POWER
108 #define VUMETER_HELP BUTTON_PLAY
109 #define VUMETER_MENU BUTTON_SELECT
110 #define VUMETER_MENU_EXIT BUTTON_SELECT
111 #define VUMETER_MENU_EXIT2 BUTTON_POWER
112 #define VUMETER_UP BUTTON_UP
113 #define VUMETER_DOWN BUTTON_DOWN
115 #elif CONFIG_KEYPAD == IRIVER_H10_PAD
116 #define VUMETER_QUIT BUTTON_POWER
117 #define VUMETER_HELP BUTTON_PLAY
118 #define VUMETER_MENU BUTTON_REW
119 #define VUMETER_MENU_EXIT BUTTON_REW
120 #define VUMETER_MENU_EXIT2 BUTTON_POWER
121 #define VUMETER_UP BUTTON_SCROLL_UP
122 #define VUMETER_DOWN BUTTON_SCROLL_DOWN
124 #elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
125 #define VUMETER_QUIT BUTTON_BACK
126 #define VUMETER_HELP BUTTON_NEXT
127 #define VUMETER_MENU BUTTON_MENU
128 #define VUMETER_MENU_EXIT BUTTON_MENU
129 #define VUMETER_MENU_EXIT2 BUTTON_PLAY
130 #define VUMETER_UP BUTTON_UP
131 #define VUMETER_DOWN BUTTON_DOWN
135 const struct plugin_api
* rb
;
137 #if defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
138 #define mas_codec_readreg(x) rand()%MAX_PEAK
141 /* Defines x positions on a logarithmic (dBfs) scale. */
142 unsigned char analog_db_scale
[LCD_WIDTH
/2];
144 /* Define's y positions, to make the needle arch, like a real needle would. */
145 unsigned char y_values
[LCD_WIDTH
/2];
147 const unsigned char digital_db_scale
[] =
148 {0,2,3,5,5,6,6,6,7,7,7,7,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,
149 10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11};
151 const unsigned char needle_cover
[] =
152 {0x18, 0x1c, 0x1c, 0x1e, 0x1e, 0x1f, 0x1f, 0x1f, 0x1e, 0x1e, 0x1c, 0x1c, 0x18};
154 const unsigned char sound_speaker
[] = {0x18,0x24,0x42,0xFF};
155 const unsigned char sound_low_level
[] = {0x24,0x18};
156 const unsigned char sound_med_level
[] = {0x42,0x3C};
157 const unsigned char sound_high_level
[] = {0x81,0x7E};
158 const unsigned char sound_max_level
[] = {0x0E,0xDF,0x0E};
160 const int half_width
= LCD_WIDTH
/ 2;
161 const int quarter_width
= LCD_WIDTH
/ 4;
162 const int half_height
= LCD_HEIGHT
/ 2;
164 /* approx ratio of the previous hard coded values */
165 const int analog_mini_1
= (LCD_WIDTH
/ 2)*0.1;
166 const int analog_mini_2
= (LCD_WIDTH
/ 2)*0.25;
167 const int analog_mini_3
= (LCD_WIDTH
/ 2)*0.4;
168 const int analog_mini_4
= (LCD_WIDTH
/ 2)*0.75;
170 const int digital_block_width
= LCD_WIDTH
/ 11;
171 const int digital_block_gap
= (int)(LCD_WIDTH
/ 11) / 10;
172 /* ammount to lead in on left so 11x blocks are centered - is often 0 */
173 const int digital_lead
= (LCD_WIDTH
- (((int)(LCD_WIDTH
/ 11))*11) ) / 2;
175 const int digital_block_height
= (LCD_HEIGHT
- 54) / 2 ;
177 #define ANALOG 0 /* The two meter types */
180 int left_needle_top_y
;
181 int left_needle_top_x
;
182 int last_left_needle_top_x
;
183 int right_needle_top_y
;
184 int right_needle_top_x
;
185 int last_right_needle_top_x
= LCD_WIDTH
/ 2;
189 int last_num_left_leds
;
190 int last_num_right_leds
;
194 #define MAX_PEAK 0x8000
196 /* gap at the top for left/right etc */
197 #define NEEDLE_TOP 25
199 /* pow(M_E, 5) * 65536 */
200 #define E_POW_5 9726404
202 struct saved_settings
{
204 bool analog_use_db_scale
;
205 bool digital_use_db_scale
;
206 bool analog_minimeters
;
207 bool digital_minimeters
;
212 void reset_settings(void) {
213 vumeter_settings
.meter_type
=ANALOG
;
214 vumeter_settings
.analog_use_db_scale
=true;
215 vumeter_settings
.digital_use_db_scale
=true;
216 vumeter_settings
.analog_minimeters
=true;
217 vumeter_settings
.digital_minimeters
=false;
218 vumeter_settings
.analog_decay
=3;
219 vumeter_settings
.digital_decay
=0;
222 void calc_scales(void)
224 unsigned int fx_log_factor
= E_POW_5
/half_width
;
229 int nh
= LCD_HEIGHT
- NEEDLE_TOP
;
232 for (i
=1; i
<= half_width
; i
++)
235 y
= (half_width
/5)*flog(i
*fx_log_factor
);
237 /* better way of checking for negative values? */
242 analog_db_scale
[i
-1] = z
;
246 /* y values (analog needle co-ords) */
247 j
= i
- (int)(half_width
/2);
250 /* fsqrt+1 seems to give a closer approximation */
251 y_values
[i
-1] = LCD_HEIGHT
- (fsqrt(k
, 16)>>8) - 1;
256 void load_settings(void) {
257 int fp
= rb
->open(PLUGIN_DEMOS_DIR
"/.vu_meter", O_RDONLY
);
259 rb
->read(fp
, &vumeter_settings
, sizeof(struct saved_settings
));
264 #if CONFIG_KEYPAD == RECORDER_PAD
265 rb
->splash(HZ
, "Press ON for help");
266 #elif CONFIG_KEYPAD == ONDIO_PAD
267 rb
->splash(HZ
, "Press MODE for help");
272 void save_settings(void) {
273 int fp
= rb
->creat(PLUGIN_DEMOS_DIR
"/.vu_meter");
275 rb
->write (fp
, &vumeter_settings
, sizeof(struct saved_settings
));
280 void change_volume(int delta
) {
282 int minvol
= rb
->sound_min(SOUND_VOLUME
);
283 int maxvol
= rb
->sound_max(SOUND_VOLUME
);
284 int vol
= rb
->global_settings
->volume
+ delta
;
286 if (vol
> maxvol
) vol
= maxvol
;
287 else if (vol
< minvol
) vol
= minvol
;
288 if (vol
!= rb
->global_settings
->volume
) {
289 rb
->sound_set(SOUND_VOLUME
, vol
);
290 rb
->global_settings
->volume
= vol
;
291 rb
->snprintf(curr_vol
, sizeof(curr_vol
), "%d", vol
);
292 rb
->lcd_putsxy(0,0, curr_vol
);
298 static bool vu_meter_menu(void)
301 bool menu_quit
= false;
304 MENUITEM_STRINGLIST(menu
,"VU Meter Menu",NULL
,"Meter Type","Scale",
305 "Minimeters","Decay Speed","Quit");
307 static const struct opt_items meter_type_option
[2] = {
312 static const struct opt_items decay_speed_option
[7] = {
317 { "Medium-Slow", -1 },
323 switch(rb
->do_menu(&menu
, &selection
))
326 rb
->set_option("Meter Type", &vumeter_settings
.meter_type
, INT
,
327 meter_type_option
, 2, NULL
);
331 if(vumeter_settings
.meter_type
==ANALOG
)
333 rb
->set_bool_options("Scale", &vumeter_settings
.analog_use_db_scale
,
334 "dBfs", -1, "Linear", -1, NULL
);
338 rb
->set_bool_options("Scale", &vumeter_settings
.digital_use_db_scale
,
339 "dBfs", -1, "Linear", -1, NULL
);
344 if(vumeter_settings
.meter_type
==ANALOG
)
346 rb
->set_bool("Enable Minimeters",
347 &vumeter_settings
.analog_minimeters
);
351 rb
->set_bool("Enable Minimeters",
352 &vumeter_settings
.digital_minimeters
);
357 if(vumeter_settings
.meter_type
==ANALOG
)
359 rb
->set_option("Decay Speed", &vumeter_settings
.analog_decay
, INT
,
360 decay_speed_option
, 7, NULL
);
364 rb
->set_option("Decay Speed", &vumeter_settings
.digital_decay
, INT
,
365 decay_speed_option
, 7, NULL
);
371 /* fall through to exit the menu */
377 /* the menu uses the userfont, set it back to sysfont */
378 rb
->lcd_setfont(FONT_SYSFIXED
);
382 void draw_analog_minimeters(void) {
383 rb
->lcd_mono_bitmap(sound_speaker
, quarter_width
-28, 12, 4, 8);
384 rb
->lcd_set_drawmode(DRMODE_FG
);
385 if(analog_mini_1
<left_needle_top_x
)
386 rb
->lcd_mono_bitmap(sound_low_level
, quarter_width
-23, 12, 2, 8);
387 if(analog_mini_2
<left_needle_top_x
)
388 rb
->lcd_mono_bitmap(sound_med_level
, quarter_width
-21, 12, 2, 8);
389 if(analog_mini_3
<left_needle_top_x
)
390 rb
->lcd_mono_bitmap(sound_high_level
, quarter_width
-19, 12, 2, 8);
391 if(analog_mini_4
<left_needle_top_x
)
392 rb
->lcd_mono_bitmap(sound_max_level
, quarter_width
-16, 12, 3, 8);
394 rb
->lcd_set_drawmode(DRMODE_SOLID
);
395 rb
->lcd_mono_bitmap(sound_speaker
, quarter_width
+half_width
-30, 12, 4, 8);
396 rb
->lcd_set_drawmode(DRMODE_FG
);
397 if(analog_mini_1
<(right_needle_top_x
-half_width
))
398 rb
->lcd_mono_bitmap(sound_low_level
, quarter_width
+half_width
-25, 12, 2, 8);
399 if(analog_mini_2
<(right_needle_top_x
-half_width
))
400 rb
->lcd_mono_bitmap(sound_med_level
, quarter_width
+half_width
-23, 12, 2, 8);
401 if(analog_mini_3
<(right_needle_top_x
-half_width
))
402 rb
->lcd_mono_bitmap(sound_high_level
, quarter_width
+half_width
-21, 12, 2, 8);
403 if(analog_mini_4
<(right_needle_top_x
-half_width
))
404 rb
->lcd_mono_bitmap(sound_max_level
, quarter_width
+half_width
-18, 12, 3, 8);
405 rb
->lcd_set_drawmode(DRMODE_SOLID
);
408 void draw_digital_minimeters(void) {
409 rb
->lcd_mono_bitmap(sound_speaker
, 34, half_height
-8, 4, 8);
410 rb
->lcd_set_drawmode(DRMODE_FG
);
412 rb
->lcd_mono_bitmap(sound_low_level
, 39, half_height
-8, 2, 8);
414 rb
->lcd_mono_bitmap(sound_med_level
, 41, half_height
-8, 2, 8);
416 rb
->lcd_mono_bitmap(sound_high_level
, 43, half_height
-8, 2, 8);
418 rb
->lcd_mono_bitmap(sound_max_level
, 46, half_height
-8, 3, 8);
420 rb
->lcd_set_drawmode(DRMODE_SOLID
);
421 rb
->lcd_mono_bitmap(sound_speaker
, 34, half_height
+8, 4, 8);
422 rb
->lcd_set_drawmode(DRMODE_FG
);
423 if(1<(num_right_leds
))
424 rb
->lcd_mono_bitmap(sound_low_level
, 39, half_height
+8, 2, 8);
425 if(2<(num_right_leds
))
426 rb
->lcd_mono_bitmap(sound_med_level
, 41, half_height
+8, 2, 8);
427 if(5<(num_right_leds
))
428 rb
->lcd_mono_bitmap(sound_high_level
, 43, half_height
+8, 2, 8);
429 if(8<(num_right_leds
))
430 rb
->lcd_mono_bitmap(sound_max_level
, 46, half_height
+8, 3, 8);
431 rb
->lcd_set_drawmode(DRMODE_SOLID
);
434 void analog_meter(void) {
436 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
437 int left_peak
= rb
->mas_codec_readreg(0xC);
438 int right_peak
= rb
->mas_codec_readreg(0xD);
439 #elif (CONFIG_CODEC == SWCODEC)
440 int left_peak
, right_peak
;
441 rb
->pcm_calculate_peaks(&left_peak
, &right_peak
);
444 if(vumeter_settings
.analog_use_db_scale
) {
445 left_needle_top_x
= analog_db_scale
[left_peak
* half_width
/ MAX_PEAK
];
446 right_needle_top_x
= analog_db_scale
[right_peak
* half_width
/ MAX_PEAK
] + half_width
;
449 left_needle_top_x
= left_peak
* half_width
/ MAX_PEAK
;
450 right_needle_top_x
= right_peak
* half_width
/ MAX_PEAK
+ half_width
;
453 /* Makes a decay on the needle */
454 left_needle_top_x
= (left_needle_top_x
+last_left_needle_top_x
*vumeter_settings
.analog_decay
)
455 /(vumeter_settings
.analog_decay
+1);
456 right_needle_top_x
= (right_needle_top_x
+last_right_needle_top_x
*vumeter_settings
.analog_decay
)
457 /(vumeter_settings
.analog_decay
+1);
459 last_left_needle_top_x
= left_needle_top_x
;
460 last_right_needle_top_x
= right_needle_top_x
;
462 left_needle_top_y
= y_values
[left_needle_top_x
];
463 right_needle_top_y
= y_values
[right_needle_top_x
-half_width
];
466 rb
->lcd_drawline(quarter_width
, LCD_HEIGHT
-1, left_needle_top_x
, left_needle_top_y
);
467 rb
->lcd_drawline((quarter_width
+half_width
), LCD_HEIGHT
-1, right_needle_top_x
, right_needle_top_y
);
469 if(vumeter_settings
.analog_minimeters
)
470 draw_analog_minimeters();
473 rb
->lcd_set_drawmode(DRMODE_FG
);
474 rb
->lcd_mono_bitmap(needle_cover
, quarter_width
-6, LCD_HEIGHT
-5, 13, 5);
475 rb
->lcd_mono_bitmap(needle_cover
, half_width
+quarter_width
-6, LCD_HEIGHT
-5, 13, 5);
476 rb
->lcd_set_drawmode(DRMODE_SOLID
);
478 /* Show Left/Right */
479 rb
->lcd_putsxy(quarter_width
-12, 12, "Left");
480 rb
->lcd_putsxy(half_width
+quarter_width
-12, 12, "Right");
482 /* Line above/below the Left/Right text */
483 rb
->lcd_drawline(0,9,LCD_WIDTH
-1,9);
484 rb
->lcd_drawline(0,21,LCD_WIDTH
-1,21);
486 for(i
=0; i
<half_width
; i
++) {
487 rb
->lcd_drawpixel(i
, (y_values
[i
])-2);
488 rb
->lcd_drawpixel(i
+half_width
, (y_values
[i
])-2);
492 void digital_meter(void) {
493 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
494 int left_peak
= rb
->mas_codec_readreg(0xC);
495 int right_peak
= rb
->mas_codec_readreg(0xD);
496 #elif (CONFIG_CODEC == SWCODEC)
497 int left_peak
, right_peak
;
498 rb
->pcm_calculate_peaks(&left_peak
, &right_peak
);
501 if(vumeter_settings
.digital_use_db_scale
) {
502 num_left_leds
= digital_db_scale
[left_peak
* 44 / MAX_PEAK
];
503 num_right_leds
= digital_db_scale
[right_peak
* 44 / MAX_PEAK
];
506 num_left_leds
= left_peak
* 11 / MAX_PEAK
;
507 num_right_leds
= right_peak
* 11 / MAX_PEAK
;
510 num_left_leds
= (num_left_leds
+last_num_left_leds
*vumeter_settings
.digital_decay
)
511 /(vumeter_settings
.digital_decay
+1);
512 num_right_leds
= (num_right_leds
+last_num_right_leds
*vumeter_settings
.digital_decay
)
513 /(vumeter_settings
.digital_decay
+1);
515 last_num_left_leds
= num_left_leds
;
516 last_num_right_leds
= num_right_leds
;
518 rb
->lcd_set_drawmode(DRMODE_FG
);
520 for(i
=0; i
<num_left_leds
; i
++)
521 rb
->lcd_fillrect((digital_lead
+ (i
*digital_block_width
)),
522 14, digital_block_width
- digital_block_gap
, digital_block_height
);
524 for(i
=0; i
<num_right_leds
; i
++)
525 rb
->lcd_fillrect((digital_lead
+ (i
*digital_block_width
)),
526 (half_height
+ 20), digital_block_width
- digital_block_gap
,
527 digital_block_height
);
529 rb
->lcd_set_drawmode(DRMODE_SOLID
);
531 if(vumeter_settings
.digital_minimeters
)
532 draw_digital_minimeters();
534 /* Lines above/below where the LEDS are */
535 rb
->lcd_drawline(0,12,LCD_WIDTH
-1,12);
536 rb
->lcd_drawline(0,half_height
-12,LCD_WIDTH
-1,half_height
-12);
538 rb
->lcd_drawline(0,half_height
+18,LCD_WIDTH
-1,half_height
+18);
539 rb
->lcd_drawline(0,LCD_HEIGHT
-6,LCD_WIDTH
-1,LCD_HEIGHT
-6);
541 /* Show Left/Right */
542 rb
->lcd_putsxy(2, half_height
-8, "Left");
543 rb
->lcd_putsxy(2, half_height
+8, "Right");
545 /* Line in the middle */
546 rb
->lcd_drawline(0,half_height
+3,LCD_WIDTH
-1,half_height
+3);
549 enum plugin_status
plugin_start(struct plugin_api
* api
, void* parameter
) {
551 int lastbutton
= BUTTON_NONE
;
559 rb
->lcd_setfont(FONT_SYSFIXED
);
563 rb
->lcd_clear_display();
565 rb
->lcd_putsxy(half_width
-23, 0, "VU Meter");
567 if(vumeter_settings
.meter_type
==ANALOG
)
574 button
= rb
->button_get_w_tmo(1);
577 #ifdef VUMETER_RC_QUIT
578 case VUMETER_RC_QUIT
:
586 #ifdef VUMETER_HELP_PRE
587 if (lastbutton
!= VUMETER_HELP_PRE
)
590 rb
->lcd_clear_display();
591 rb
->lcd_puts(0, 0, "OFF: Exit");
592 #if CONFIG_KEYPAD == RECORDER_PAD
593 rb
->lcd_puts(0, 1, "F1: Settings");
594 #elif CONFIG_KEYPAD == ONDIO_PAD
595 rb
->lcd_puts(0, 1, "MODE..: Settings");
597 rb
->lcd_puts(0, 2, "UP/DOWN: Volume");
608 #ifdef VUMETER_MENU_PRE
609 if (lastbutton
!= VUMETER_MENU_PRE
)
617 case VUMETER_UP
| BUTTON_REPEAT
:
622 case VUMETER_DOWN
| BUTTON_REPEAT
:
627 if(rb
->default_event_handler(button
) == SYS_USB_CONNECTED
)
628 return PLUGIN_USB_CONNECTED
;
631 if (button
!= BUTTON_NONE
)
635 #endif /* #ifdef HAVE_LCD_BITMAP */