Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: voice in keyboard.c
From: Christopher Moore (christopher.h.moore_at_verizon.net)
Date: 2004-05-04


On Mon, May 03, 2004 at 08:01:53PM -0500, Glenn Ervin at Home wrote:
> Does this cause these keys to say which letters one is moving to?
Yes. The right/left up/down buttons navigate the choices of letters and
numbers shown on the display. When you land on a letter/number you want ot add to
the name, you would hit play to add it. Likewise, the on+right and on+left
buttons move the cursor within the proposed filename.

Chris
> Glenn
> ----- Original Message -----
> From: "Christopher Moore" <christopher.h.moore_at_verizon.net>
> To: "rockbox devel" <rockbox_at_cool.haxx.se>
> Sent: Monday, May 03, 2004 2:34 PM
> Subject: voice in keyboard.c
>
>
> Hello,
> Below is a simple patch to keyboard.c which gives voice output when renaming
> files/directories or creating directories. Voice output has been added to
> the following keys:
> left, right, on+left, on+right and play.
>
> I've only tested the patch on an fmr and have not looked into whether the
> same logic would work on the player side. If anyone wishes to test this on
> an fmr, I can send a prebuilt binary (.ajz file) privately.
>
> Chris
>
>
> --- apps/recorder/keyboard.c.orig 2004-04-30 15:40:36.000000000 -0400
> +++ apps/recorder/keyboard.c 2004-05-03 14:48:41.000000000 -0400
> @@ -26,6 +26,7 @@
> #include "font.h"
> #include "screens.h"
> #include "status.h"
> +#include "talk.h"
>
> #define KEYBOARD_LINES 4
> #define KEYBOARD_PAGES 3
> @@ -72,6 +73,7 @@
>
> char outline[256];
> char c = 0;
> + char spell_char[2]; /* store char to pass to talk_spell */
> struct font* font = font_get(FONT_SYSFIXED);
>
> lcd_setfont(FONT_SYSFIXED);
> @@ -89,6 +91,7 @@
> max_chars = LCD_WIDTH / font_w;
> kbd_setupkeys(line, page);
>
> + talk_spell(text, true); /* spell initial test */
> while(!done)
> {
> len = strlen(text);
> @@ -193,7 +196,12 @@
> case BUTTON_RIGHT:
> case BUTTON_RIGHT | BUTTON_REPEAT:
> if (x < (int)strlen(line[y]) - 1)
> + {
> x++;
> + spell_char[0] = line[y][x];
> + spell_char[1] = '\0'; /* mark end of char string */
> + talk_spell(spell_char, false);
> + }
> else
> x = 0;
> break;
> @@ -201,7 +209,12 @@
> case BUTTON_LEFT:
> case BUTTON_LEFT | BUTTON_REPEAT:
> if (x)
> + {
> x--;
> + spell_char[0] = line[y][x];
> + spell_char[1] = '\0'; /* mark end of char string */
> + talk_spell(spell_char, false);
> + }
> else
> x = strlen(line[y]) - 1;
> break;
> @@ -261,6 +274,7 @@
> }
> editpos++;
> }
> + talk_spell(text, false); /* speak revised text */
> break;
>
> case BUTTON_ON | BUTTON_RIGHT:
> @@ -269,6 +283,11 @@
> editpos++;
> if (editpos > len)
> editpos = len;
> + else
> + {
> + spell_char[0] = text[editpos-1];
> + talk_spell(spell_char, false);
> + }
> break;
>
> case BUTTON_ON | BUTTON_LEFT:
> @@ -277,6 +296,11 @@
> editpos--;
> if (editpos < 0)
> editpos = 0;
> + else
> + {
> + spell_char[0] = text[editpos];
> + talk_spell(spell_char, false);
> + }
> break;
>
> case SYS_USB_CONNECTED:
> _______________________________________________
> http://cool.haxx.se/mailman/listinfo/rockbox
>
> _______________________________________________
> http://cool.haxx.se/mailman/listinfo/rockbox
_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa