summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/sound_menu.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/apps/sound_menu.c b/apps/sound_menu.c
index e0716a5e86..6e4523cb89 100644
--- a/apps/sound_menu.c
+++ b/apps/sound_menu.c
@@ -763,7 +763,8 @@ static bool stereo_width(void)
763bool sound_menu(void) 763bool sound_menu(void)
764{ 764{
765 int m; 765 int m;
766 bool result; 766 bool done = false;
767 int selected;
767 static const struct menu_item items[] = { 768 static const struct menu_item items[] = {
768 { ID2P(LANG_VOLUME), volume }, 769 { ID2P(LANG_VOLUME), volume },
769#ifndef HAVE_TLV320 770#ifndef HAVE_TLV320
@@ -792,21 +793,33 @@ bool sound_menu(void)
792 { ID2P(LANG_MDB_SHAPE), mdb_shape }, 793 { ID2P(LANG_MDB_SHAPE), mdb_shape },
793#endif 794#endif
794 }; 795 };
795
796#if CONFIG_CODEC == SWCODEC
797 pcmbuf_set_low_latency(true);
798#endif
799 796
800 m=menu_init( items, sizeof(items) / sizeof(*items), NULL, 797 m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
801 NULL, NULL, NULL); 798 NULL, NULL, NULL);
802 result = menu_run(m); 799 while (!done)
803 menu_exit(m); 800 {
801 switch (selected=menu_show(m))
802 {
803 case MENU_SELECTED_EXIT:
804 case MENU_ATTACHED_USB:
805 done = true;
806 break;
807 default:
808#if CONFIG_CODEC == SWCODEC
809 pcmbuf_set_low_latency(true);
810#endif
811 if (items[selected].function)
812 items[selected].function();
804 813
805#if CONFIG_CODEC == SWCODEC 814#if CONFIG_CODEC == SWCODEC
806 pcmbuf_set_low_latency(false); 815 pcmbuf_set_low_latency(false);
807#endif 816#endif
817 gui_syncstatusbar_draw(&statusbars, true);
818 }
819 }
820 menu_exit(m);
808 821
809 return result; 822 return selected==MENU_ATTACHED_USB?true:false;
810} 823}
811 824
812#ifdef HAVE_RECORDING 825#ifdef HAVE_RECORDING