summaryrefslogtreecommitdiff
path: root/apps/menus/playback_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menus/playback_menu.c')
-rw-r--r--apps/menus/playback_menu.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c
index 6beda93991..89472d45b9 100644
--- a/apps/menus/playback_menu.c
+++ b/apps/menus/playback_menu.c
@@ -37,6 +37,10 @@
37#include "misc.h" 37#include "misc.h"
38#if CONFIG_CODEC == SWCODEC 38#if CONFIG_CODEC == SWCODEC
39#include "playback.h" 39#include "playback.h"
40#include "pcm_sampr.h"
41#ifdef HAVE_PLAY_FREQ
42#include "talk.h"
43#endif
40#endif 44#endif
41 45
42 46
@@ -192,6 +196,10 @@ MENUITEM_SETTING(prevent_skip, &global_settings.prevent_skip, NULL);
192MENUITEM_SETTING(resume_rewind, &global_settings.resume_rewind, NULL); 196MENUITEM_SETTING(resume_rewind, &global_settings.resume_rewind, NULL);
193#endif 197#endif
194MENUITEM_SETTING(pause_rewind, &global_settings.pause_rewind, NULL); 198MENUITEM_SETTING(pause_rewind, &global_settings.pause_rewind, NULL);
199#ifdef HAVE_PLAY_FREQ
200MENUITEM_SETTING(play_frequency, &global_settings.play_frequency,
201 playback_callback);
202#endif
195 203
196MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0, 204MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
197 Icon_Playback_menu, 205 Icon_Playback_menu,
@@ -217,12 +225,15 @@ MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
217#ifdef HAVE_HEADPHONE_DETECTION 225#ifdef HAVE_HEADPHONE_DETECTION
218 ,&unplug_menu 226 ,&unplug_menu
219#endif 227#endif
220 ,&skip_length, &prevent_skip, 228 ,&skip_length, &prevent_skip
221 229
222#if CONFIG_CODEC == SWCODEC 230#if CONFIG_CODEC == SWCODEC
223 &resume_rewind, 231 ,&resume_rewind
232#endif
233 ,&pause_rewind
234#ifdef HAVE_PLAY_FREQ
235 ,&play_frequency
224#endif 236#endif
225 &pause_rewind,
226 ); 237 );
227 238
228static int playback_callback(int action,const struct menu_item_ex *this_item) 239static int playback_callback(int action,const struct menu_item_ex *this_item)
@@ -243,9 +254,19 @@ static int playback_callback(int action,const struct menu_item_ex *this_item)
243 break; 254 break;
244 255
245 case ACTION_EXIT_MENUITEM: /* on exit */ 256 case ACTION_EXIT_MENUITEM: /* on exit */
257 /* Playing or not */
258#ifdef HAVE_PLAY_FREQ
259 if (this_item == &play_frequency)
260 {
261 settings_apply_play_freq(global_settings.play_frequency, false);
262 break;
263 }
264#endif /* HAVE_PLAY_FREQ */
265
246 if (!(audio_status() & AUDIO_STATUS_PLAY)) 266 if (!(audio_status() & AUDIO_STATUS_PLAY))
247 break; 267 break;
248 268
269 /* Playing only */
249 if (this_item == &shuffle_item) 270 if (this_item == &shuffle_item)
250 { 271 {
251 if (old_shuffle == global_settings.playlist_shuffle) 272 if (old_shuffle == global_settings.playlist_shuffle)