summaryrefslogtreecommitdiff
path: root/apps/gui/wps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r--apps/gui/wps.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index e686fcc533..cbf003adbd 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -121,9 +121,11 @@ char* wps_default_skin(enum screen_type screen)
121 121
122void pause_action(bool may_fade, bool updatewps) 122void pause_action(bool may_fade, bool updatewps)
123{ 123{
124#if CONFIG_CODEC != SWCODEC
124 if (may_fade && global_settings.fade_on_stop) 125 if (may_fade && global_settings.fade_on_stop)
125 fade(false, updatewps); 126 fade(false, updatewps);
126 else 127 else
128#endif
127 audio_pause(); 129 audio_pause();
128 130
129 if (global_settings.pause_rewind) { 131 if (global_settings.pause_rewind) {
@@ -136,16 +138,22 @@ void pause_action(bool may_fade, bool updatewps)
136 - global_settings.pause_rewind * 1000; 138 - global_settings.pause_rewind * 1000;
137 audio_ff_rewind(newpos > 0 ? newpos : 0); 139 audio_ff_rewind(newpos > 0 ? newpos : 0);
138 } 140 }
141
142 (void)may_fade; (void)updatewps;
139} 143}
140 144
141void unpause_action(bool may_fade, bool updatewps) 145void unpause_action(bool may_fade, bool updatewps)
142{ 146{
147#if CONFIG_CODEC != SWCODEC
143 if (may_fade && global_settings.fade_on_stop) 148 if (may_fade && global_settings.fade_on_stop)
144 fade(true, updatewps); 149 fade(true, updatewps);
145 else 150 else
151#endif
146 audio_resume(); 152 audio_resume();
153 (void)may_fade; (void)updatewps;
147} 154}
148 155
156#if CONFIG_CODEC != SWCODEC
149void fade(bool fade_in, bool updatewps) 157void fade(bool fade_in, bool updatewps)
150{ 158{
151 int fp_global_vol = global_settings.volume << 8; 159 int fp_global_vol = global_settings.volume << 8;
@@ -204,6 +212,7 @@ void fade(bool fade_in, bool updatewps)
204 sound_set_volume(global_settings.volume); 212 sound_set_volume(global_settings.volume);
205 } 213 }
206} 214}
215#endif /* SWCODEC */
207 216
208static bool update_onvol_change(enum screen_type screen) 217static bool update_onvol_change(enum screen_type screen)
209{ 218{
@@ -569,7 +578,7 @@ static void play_hop(int direction)
569 { 578 {
570#if CONFIG_CODEC == SWCODEC 579#if CONFIG_CODEC == SWCODEC
571 if(global_settings.beep) 580 if(global_settings.beep)
572 pcmbuf_beep(1000, 150, 1500*global_settings.beep); 581 beep_play(1000, 150, 1500*global_settings.beep);
573#endif 582#endif
574 return; 583 return;
575 } 584 }
@@ -1127,9 +1136,12 @@ long gui_wps_show(void)
1127 status_set_record(false); 1136 status_set_record(false);
1128 status_set_audio(false); 1137 status_set_audio(false);
1129#endif 1138#endif
1139#if CONFIG_CODEC != SWCODEC
1130 if (global_settings.fade_on_stop) 1140 if (global_settings.fade_on_stop)
1131 fade(false, true); 1141 fade(false, true);
1132 1142#else
1143 audio_pause();
1144#endif
1133 if (bookmark) 1145 if (bookmark)
1134 bookmark_autobookmark(true); 1146 bookmark_autobookmark(true);
1135 audio_stop(); 1147 audio_stop();