added volume control
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1117 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
601924a777
commit
1a3b6478b8
1 changed files with 31 additions and 0 deletions
31
apps/play.c
31
apps/play.c
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "id3.h"
|
||||
#include "mpeg.h"
|
||||
#include "settings.h"
|
||||
|
||||
#ifdef MPEG_PLAY
|
||||
#include "mpegplay.h"
|
||||
|
@ -91,9 +92,39 @@ void playtune(char *filename)
|
|||
while(1) {
|
||||
switch ( button_get(true) ) {
|
||||
#ifdef HAVE_RECORDER_KEYPAD
|
||||
case BUTTON_UP:
|
||||
global_settings.volume += 2;
|
||||
if(global_settings.volume > 100)
|
||||
global_settings.volume = 100;
|
||||
mpeg_volume(global_settings.volume);
|
||||
break;
|
||||
|
||||
case BUTTON_DOWN:
|
||||
global_settings.volume -= 2;
|
||||
if(global_settings.volume < 0)
|
||||
global_settings.volume = 0;
|
||||
mpeg_volume(global_settings.volume);
|
||||
break;
|
||||
|
||||
case BUTTON_OFF:
|
||||
case BUTTON_LEFT:
|
||||
return;
|
||||
break;
|
||||
#else
|
||||
case BUTTON_RIGHT:
|
||||
global_settings.volume += 2;
|
||||
if(global_settings.volume > 100)
|
||||
global_settings.volume = 100;
|
||||
mpeg_volume(global_settings.volume);
|
||||
break;
|
||||
|
||||
case BUTTON_LEFT:
|
||||
global_settings.volume -= 2;
|
||||
if(global_settings.volume < 0)
|
||||
global_settings.volume = 0;
|
||||
mpeg_volume(global_settings.volume);
|
||||
break;
|
||||
|
||||
case BUTTON_STOP:
|
||||
#endif
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue