diff options
-rw-r--r-- | apps/plugins/announce_status.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/apps/plugins/announce_status.c b/apps/plugins/announce_status.c index f9f656da86..db7b890a51 100644 --- a/apps/plugins/announce_status.c +++ b/apps/plugins/announce_status.c | |||
@@ -106,6 +106,8 @@ static struct | |||
106 | unsigned int index; | 106 | unsigned int index; |
107 | int bin_added; | 107 | int bin_added; |
108 | 108 | ||
109 | bool show_prompt; | ||
110 | |||
109 | unsigned char wps_fmt[MAX_ANNOUNCE_WPS+1]; | 111 | unsigned char wps_fmt[MAX_ANNOUNCE_WPS+1]; |
110 | } gAnnounce; | 112 | } gAnnounce; |
111 | 113 | ||
@@ -115,6 +117,7 @@ static struct configdata config[] = | |||
115 | {TYPE_INT, 0, 2, { .int_p = &gAnnounce.announce_on }, "Announce", NULL}, | 117 | {TYPE_INT, 0, 2, { .int_p = &gAnnounce.announce_on }, "Announce", NULL}, |
116 | {TYPE_INT, 0, 10, { .int_p = &gAnnounce.grouping }, "Grouping", NULL}, | 118 | {TYPE_INT, 0, 10, { .int_p = &gAnnounce.grouping }, "Grouping", NULL}, |
117 | {TYPE_INT, 0, 10000, { .int_p = &gAnnounce.bin_added }, "Added", NULL}, | 119 | {TYPE_INT, 0, 10000, { .int_p = &gAnnounce.bin_added }, "Added", NULL}, |
120 | {TYPE_BOOL, 0, 1, { .bool_p = &gAnnounce.show_prompt }, "Prompt", NULL}, | ||
118 | {TYPE_STRING, 0, MAX_ANNOUNCE_WPS+1, | 121 | {TYPE_STRING, 0, MAX_ANNOUNCE_WPS+1, |
119 | { .string = (char*)&gAnnounce.wps_fmt }, "Fmt", NULL}, | 122 | { .string = (char*)&gAnnounce.wps_fmt }, "Fmt", NULL}, |
120 | }; | 123 | }; |
@@ -153,6 +156,7 @@ static void config_set_defaults(void) | |||
153 | gAnnounce.announce_on = 0; | 156 | gAnnounce.announce_on = 0; |
154 | gAnnounce.grouping = 0; | 157 | gAnnounce.grouping = 0; |
155 | gAnnounce.wps_fmt[0] = '\0'; | 158 | gAnnounce.wps_fmt[0] = '\0'; |
159 | gAnnounce.show_prompt = true; | ||
156 | } | 160 | } |
157 | 161 | ||
158 | static void config_reset_voice(void) | 162 | static void config_reset_voice(void) |
@@ -189,7 +193,7 @@ static void announce_test(void) | |||
189 | rb->talk_force_shutup(); | 193 | rb->talk_force_shutup(); |
190 | rb->sleep(HZ / 2); | 194 | rb->sleep(HZ / 2); |
191 | voice_info_group(gAnnounce.wps_fmt, true); | 195 | voice_info_group(gAnnounce.wps_fmt, true); |
192 | 196 | rb->splash(HZ, "..."); | |
193 | //rb->talk_force_enqueue_next(); | 197 | //rb->talk_force_enqueue_next(); |
194 | } | 198 | } |
195 | 199 | ||
@@ -267,7 +271,7 @@ static int announce_menu_cb(int action, | |||
267 | announce_add("D2Dd ;"); | 271 | announce_add("D2Dd ;"); |
268 | break; | 272 | break; |
269 | case 2: /*Track*/ | 273 | case 2: /*Track*/ |
270 | announce_add("TT T1TeT2Tr ;"); | 274 | announce_add("TT TA T1TeT2Tr ;"); |
271 | break; | 275 | break; |
272 | case 3: /*Playlist*/ | 276 | case 3: /*Playlist*/ |
273 | announce_add("P1PC P2PN ;"); | 277 | announce_add("P1PC P2PN ;"); |
@@ -525,11 +529,14 @@ int plugin_main(const void* parameter) | |||
525 | rb->splash(HZ, ID2P(LANG_HOLD_FOR_SETTINGS)); | 529 | rb->splash(HZ, ID2P(LANG_HOLD_FOR_SETTINGS)); |
526 | } | 530 | } |
527 | 531 | ||
528 | if (rb->mixer_channel_status(PCM_MIXER_CHAN_PLAYBACK) != CHANNEL_PLAYING) | 532 | if (gAnnounce.show_prompt) |
529 | { | 533 | { |
530 | rb->talk_id(LANG_HOLD_FOR_SETTINGS, false); | 534 | if (rb->mixer_channel_status(PCM_MIXER_CHAN_PLAYBACK) != CHANNEL_PLAYING) |
535 | { | ||
536 | rb->talk_id(LANG_HOLD_FOR_SETTINGS, false); | ||
537 | } | ||
538 | rb->splash(HZ, ID2P(LANG_HOLD_FOR_SETTINGS)); | ||
531 | } | 539 | } |
532 | rb->splash(HZ, ID2P(LANG_HOLD_FOR_SETTINGS)); | ||
533 | 540 | ||
534 | rb->button_clear_queue(); | 541 | rb->button_clear_queue(); |
535 | if (rb->button_get_w_tmo(HZ) > BUTTON_NONE) | 542 | if (rb->button_get_w_tmo(HZ) > BUTTON_NONE) |
@@ -734,6 +741,10 @@ static unsigned char* voice_info_group(unsigned char* current_token, bool testin | |||
734 | { | 741 | { |
735 | rb->talk_spell(id3->title, true); | 742 | rb->talk_spell(id3->title, true); |
736 | } | 743 | } |
744 | else if (current_char == 'A' && id3->artist) | ||
745 | { | ||
746 | rb->talk_spell(id3->artist, true); | ||
747 | } | ||
737 | else if (current_char == 'A' && id3->albumartist) | 748 | else if (current_char == 'A' && id3->albumartist) |
738 | { | 749 | { |
739 | rb->talk_spell(id3->albumartist, true); | 750 | rb->talk_spell(id3->albumartist, true); |