summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/lrcplayer.c10
-rw-r--r--apps/plugins/mikmod/mikmod.c19
-rw-r--r--apps/plugins/sdl/SDL_mixer/timidity/playmidi.c2
3 files changed, 8 insertions, 23 deletions
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c
index 71e5310638..de31733671 100644
--- a/apps/plugins/lrcplayer.c
+++ b/apps/plugins/lrcplayer.c
@@ -2625,16 +2625,10 @@ static int handle_button(void)
2625 ff_rewind(0, false); 2625 ff_rewind(0, false);
2626 break; 2626 break;
2627 case ACTION_WPS_VOLDOWN: 2627 case ACTION_WPS_VOLDOWN:
2628 limit = rb->sound_min(SOUND_VOLUME); 2628 rb->adjust_volume(-1);
2629 if (--rb->global_settings->volume < limit)
2630 rb->global_settings->volume = limit;
2631 rb->sound_set(SOUND_VOLUME, rb->global_settings->volume);
2632 break; 2629 break;
2633 case ACTION_WPS_VOLUP: 2630 case ACTION_WPS_VOLUP:
2634 limit = rb->sound_max(SOUND_VOLUME); 2631 rb->adjust_volume(1);
2635 if (++rb->global_settings->volume > limit)
2636 rb->global_settings->volume = limit;
2637 rb->sound_set(SOUND_VOLUME, rb->global_settings->volume);
2638 break; 2632 break;
2639 case ACTION_WPS_CONTEXT: 2633 case ACTION_WPS_CONTEXT:
2640 ret = LRC_GOTO_EDITOR; 2634 ret = LRC_GOTO_EDITOR;
diff --git a/apps/plugins/mikmod/mikmod.c b/apps/plugins/mikmod/mikmod.c
index 6622b5fdb6..65633c0ad1 100644
--- a/apps/plugins/mikmod/mikmod.c
+++ b/apps/plugins/mikmod/mikmod.c
@@ -710,7 +710,6 @@ static void mm_errorhandler(void)
710 710
711static int playfile(char* filename) 711static int playfile(char* filename)
712{ 712{
713 int vol = 0;
714 int button; 713 int button;
715 int retval = PLUGIN_OK; 714 int retval = PLUGIN_OK;
716 bool changingpos = false; 715 bool changingpos = false;
@@ -789,13 +788,8 @@ static int playfile(char* filename)
789 } 788 }
790 break; 789 break;
791 } 790 }
792 vol = rb->global_settings->volume; 791
793 if (vol < rb->sound_max(SOUND_VOLUME)) 792 rb->adjust_volume(1);
794 {
795 vol++;
796 rb->sound_set(SOUND_VOLUME, vol);
797 rb->global_settings->volume = vol;
798 }
799 break; 793 break;
800 794
801 case ACTION_WPS_VOLDOWN: 795 case ACTION_WPS_VOLDOWN:
@@ -808,13 +802,8 @@ static int playfile(char* filename)
808 } 802 }
809 break; 803 break;
810 } 804 }
811 vol = rb->global_settings->volume; 805
812 if (vol > rb->sound_min(SOUND_VOLUME)) 806 rb->adjust_volume(-1);
813 {
814 vol--;
815 rb->sound_set(SOUND_VOLUME, vol);
816 rb->global_settings->volume = vol;
817 }
818 break; 807 break;
819 808
820 case ACTION_WPS_SKIPPREV: 809 case ACTION_WPS_SKIPPREV:
diff --git a/apps/plugins/sdl/SDL_mixer/timidity/playmidi.c b/apps/plugins/sdl/SDL_mixer/timidity/playmidi.c
index 1638732dc5..38f7109b13 100644
--- a/apps/plugins/sdl/SDL_mixer/timidity/playmidi.c
+++ b/apps/plugins/sdl/SDL_mixer/timidity/playmidi.c
@@ -21,6 +21,8 @@
21 21
22#include "tables.h" 22#include "tables.h"
23 23
24/* ROCKBOX HACK: avoid a conflict with adjust_volume() in misc.h */
25#define adjust_volume adjust_midi_volume
24 26
25static int opt_expression_curve = 2; 27static int opt_expression_curve = 2;
26static int opt_volume_curve = 2; 28static int opt_volume_curve = 2;