diff options
| author | Steve Bavin <pondlife@pondlife.me> | 2007-10-24 12:32:12 +0000 |
|---|---|---|
| committer | Steve Bavin <pondlife@pondlife.me> | 2007-10-24 12:32:12 +0000 |
| commit | 072a3c5017e4d97a0d8bc56b71d1a8b100784ef7 (patch) | |
| tree | 879e85636ba10520bbd0cdd20389f87d1b335dbe /apps/talk.c | |
| parent | 537b27d58f382277e239bbefaab3bb48a8df245e (diff) | |
| download | rockbox-072a3c5017e4d97a0d8bc56b71d1a8b100784ef7.zip rockbox-072a3c5017e4d97a0d8bc56b71d1a8b100784ef7.tar.gz rockbox-072a3c5017e4d97a0d8bc56b71d1a8b100784ef7.tar.bz2 rockbox-072a3c5017e4d97a0d8bc56b71d1a8b100784ef7.tar.xz | |
Complete info screen voicing; now consistent with displayed screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15284 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/talk.c')
| -rw-r--r-- | apps/talk.c | 99 |
1 files changed, 47 insertions, 52 deletions
diff --git a/apps/talk.c b/apps/talk.c index ede0aff..0c8fafb 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -848,66 +848,61 @@ void talk_disable(bool disable) } #if CONFIG_RTC -void talk_date_time(struct tm *tm, bool speak_current_time_string) +void talk_date(struct tm *tm, bool enqueue) { - if(global_settings.talk_menu) + talk_id(LANG_MONTH_JANUARY + tm->tm_mon, enqueue); + talk_number(tm->tm_mday, true); + talk_number(1900 + tm->tm_year, true); +} + +void talk_time(struct tm *tm, bool enqueue) +{ + if (global_settings.timeformat == 1) { - if(speak_current_time_string) - talk_id(VOICE_CURRENT_TIME, true); - if (global_settings.timeformat == 1) + /* Voice the hour */ + long am_pm_id = VOICE_AM; + int hour = tm->tm_hour; + if (hour >= 12) { - long am_pm_id = VOICE_AM; - int hour = tm->tm_hour; - - if (hour >= 12) - { - am_pm_id = VOICE_PM; - hour -= 12; - } - if (hour == 0) - hour = 12; - - talk_number(hour, true); + am_pm_id = VOICE_PM; + hour -= 12; + } + if (hour == 0) + hour = 12; + talk_number(hour, enqueue); - /* Voice the minutes */ - if (tm->tm_min == 0) - { - /* Say o'clock if the minute is 0. */ - talk_id(VOICE_OCLOCK, true); - } - else - { - /* Pronounce the leading 0 */ - if(tm->tm_min < 10) - { - talk_id(VOICE_OH, true); - } - talk_number(tm->tm_min, true); - } - talk_id(am_pm_id, true); + /* Voice the minutes */ + if (tm->tm_min == 0) + { + /* Say o'clock if the minute is 0. */ + talk_id(VOICE_OCLOCK, true); } else { - /* Voice the time in 24 hour format */ - talk_number(tm->tm_hour, true); - if (tm->tm_min == 0) - { - talk_id(VOICE_HUNDRED, true); - talk_id(VOICE_HOUR, true); - } - else - { - /* Pronounce the leading 0 */ - if(tm->tm_min < 10) - { - talk_id(VOICE_OH, true); - } - talk_number(tm->tm_min, true); - } + /* Pronounce the leading 0 */ + if(tm->tm_min < 10) + talk_id(VOICE_OH, true); + talk_number(tm->tm_min, true); + } + talk_id(am_pm_id, true); + } + else + { + /* Voice the time in 24 hour format */ + talk_number(tm->tm_hour, enqueue); + if (tm->tm_min == 0) + { + talk_id(VOICE_HUNDRED, true); + talk_id(VOICE_HOUR, true); + } + else + { + /* Pronounce the leading 0 */ + if(tm->tm_min < 10) + talk_id(VOICE_OH, true); + talk_number(tm->tm_min, true); } - talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true); - talk_number(tm->tm_mday, true); - talk_number(1900 + tm->tm_year, true); } } + #endif |