diff options
Diffstat (limited to 'apps/menus/menu_common.c')
-rw-r--r-- | apps/menus/menu_common.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/apps/menus/menu_common.c b/apps/menus/menu_common.c new file mode 100644 index 0000000000..2f3844c1ea --- /dev/null +++ b/apps/menus/menu_common.c | |||
@@ -0,0 +1,47 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 Dan Everton | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #include <stddef.h> | ||
21 | #include <limits.h> | ||
22 | #include "config.h" | ||
23 | #include "action.h" | ||
24 | #include "menu.h" | ||
25 | #include "menu_common.h" | ||
26 | #if CONFIG_CODEC == SWCODEC | ||
27 | #include "pcmbuf.h" | ||
28 | #endif | ||
29 | |||
30 | #if CONFIG_CODEC == SWCODEC | ||
31 | /* Use this callback if your menu adjusts DSP settings. */ | ||
32 | int lowlatency_callback(int action, const struct menu_item_ex *this_item) | ||
33 | { | ||
34 | (void)this_item; | ||
35 | switch (action) | ||
36 | { | ||
37 | case ACTION_ENTER_MENUITEM: /* on entering an item */ | ||
38 | pcmbuf_set_low_latency(true); | ||
39 | break; | ||
40 | case ACTION_EXIT_MENUITEM: /* on exit */ | ||
41 | pcmbuf_set_low_latency(false); | ||
42 | break; | ||
43 | } | ||
44 | return action; | ||
45 | } | ||
46 | #endif | ||
47 | |||