diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2006-12-26 12:35:14 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2006-12-26 12:35:14 +0000 |
commit | 7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7 (patch) | |
tree | a6ccc80690ebdad8003474caaac3d697592a76ec | |
parent | da7d05d5adde2e1ed6553cd814bb16a8d15f5c6c (diff) | |
download | rockbox-7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7.tar.gz rockbox-7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7.zip |
Fix FS#6270, no voice is sonud menu. This only fixes the no voice in the
actual menu. The setting screen will still have no voice if playback is
enable, but at least you know which item you are entering.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11839 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/sound_menu.c | 31 |
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) | |||
763 | bool sound_menu(void) | 763 | bool 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 |