Index: rockbox-devel/apps/lang/english.lang =================================================================== --- rockbox-devel.orig/apps/lang/english.lang +++ rockbox-devel/apps/lang/english.lang @@ -10518,3 +10518,31 @@ *: "Moving track" + + id: VOICE_EDIT + desc: keyboard + user: + + *: "" + + + *: "" + + + *: "Edit" + + + + id: VOICE_BLANK + desc: keyboard + user: + + *: "" + + + *: "" + + + *: "Blank" + + Index: rockbox-devel/apps/recorder/keyboard.c =================================================================== --- rockbox-devel.orig/apps/recorder/keyboard.c +++ rockbox-devel/apps/recorder/keyboard.c @@ -37,6 +37,8 @@ #include "file.h" #include "hangul.h" #include "action.h" +#include "pcmbuf.h" +#include "lang.h" #ifndef O_BINARY #define O_BINARY 0 @@ -168,12 +170,18 @@ int load_kbd(unsigned char* filename) /* helper function to spell a char if voice UI is enabled */ static void kbd_spellchar(unsigned short c) { - static char spell_char[2] = "\0\0"; /* store char to pass to talk_spell */ + unsigned char tmp[5]; + unsigned char* utf8; + + /* store char to pass to talk_spell */ + utf8 = utf8encode(c, tmp); + *utf8 = 0; - if (global_settings.talk_menu && c < 128) /* voice UI? */ + if (global_settings.talk_menu) /* voice UI? */ { - spell_char[0] = (char)c; - talk_spell(spell_char, false); + if(c == ' ') + talk_id(VOICE_BLANK, false); + else talk_spell(tmp, false); } } @@ -611,7 +619,7 @@ int kbd_input(char* text, int buflen) param[l].page = 0; k = (param[l].page*param[l].lines + param[l].y)*param[l].max_chars + param[l].x; - kbd_spellchar(param[l].kbd_buf[k]); + if(l==0) kbd_spellchar(param[l].kbd_buf[k]); } break; @@ -648,7 +656,8 @@ int kbd_input(char* text, int buflen) editpos++; c = utf8seek(text, editpos); kbd_spellchar(text[c]); - } + }else if(global_settings.beep) + pcmbuf_beep(1000, 150, 1500*global_settings.beep); } else #endif @@ -664,7 +673,7 @@ int kbd_input(char* text, int buflen) #endif } k = (param[l].page*param[l].lines + param[l].y)*param[l].max_chars + param[l].x; - kbd_spellchar(param[l].kbd_buf[k]); + if(l==0) kbd_spellchar(param[l].kbd_buf[k]); } } break; @@ -685,7 +694,8 @@ int kbd_input(char* text, int buflen) editpos--; c = utf8seek(text, editpos); kbd_spellchar(text[c]); - } + }else if(global_settings.beep) + pcmbuf_beep(1000, 150, 1500*global_settings.beep); } else #endif @@ -705,7 +715,7 @@ int kbd_input(char* text, int buflen) } k = (param[l].page*param[l].lines + param[l].y)*param[l].max_chars + param[l].x; - kbd_spellchar(param[l].kbd_buf[k]); + if(l==0) kbd_spellchar(param[l].kbd_buf[k]); } } break; @@ -734,6 +744,7 @@ int kbd_input(char* text, int buflen) param[l].y=0;} #else line_edit = true; + cond_talk_ids(VOICE_EDIT); } } if (!line_edit) @@ -743,7 +754,7 @@ int kbd_input(char* text, int buflen) { k = (param[l].page*param[l].lines + param[l].y)* param[l].max_chars + param[l].x; - kbd_spellchar(param[l].kbd_buf[k]); + if(l==0) kbd_spellchar(param[l].kbd_buf[k]); } } break; @@ -772,6 +783,7 @@ int kbd_input(char* text, int buflen) param[l].y = param[l].lines - 1;} #else line_edit = true; + cond_talk_ids(VOICE_EDIT); } } if (!line_edit) @@ -781,7 +793,7 @@ int kbd_input(char* text, int buflen) { k = (param[l].page*param[l].lines + param[l].y)* param[l].max_chars + param[l].x; - kbd_spellchar(param[l].kbd_buf[k]); + if(l==0) kbd_spellchar(param[l].kbd_buf[k]); } } break;