diff --git a/apps/play.c b/apps/play.c index 5949372e04..330f4a10b6 100644 --- a/apps/play.c +++ b/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;