FS#7552 - Recording frequency and encoder bitrate selection not spoken

Attached to Project: Rockbox
Opened by James Teh (jteh) - Tuesday, 07 August 2007, 11:48 GMT
Last edited by Jonathan Gordon (jdgordon) - Tuesday, 28 August 2007, 10:57 GMT
Task Type Bugs
Category User Interface
Status Closed
Assigned To No-one
Operating System Iriver H300 series
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


In recent builds (just tested with r14229), my Iriver H300 no longer speaks frequencies and bitrates in the Recording Settings menu. This did work not so long ago, but I'm not entirely sure when it broke.

To reproduce:
1. Access the main menu and select Settings->Recording Settings.
2. Enter the Frequency menu.
3. Move around the menu with up and down. Observe that the frequencies are not spoken.
4. Exit the Frequency menu.
5. Change the encoder to mp3.
6. Enter the Encoder Settings menu and then the Bitrate menu.
7. Repeat step 3 (same observation).

Note that other settings which also speak unit values, such as Volume, Balance and Battery Capacity, work as they should. I have taken a look at the code myself, but have as yet been unable to ascertain the cause of the problem.
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Tuesday, 28 August 2007, 10:57 GMT
Reason for closing:  Fixed
Comment by Dominik Riebeling (bluebrother) - Tuesday, 07 August 2007, 13:53 GMT
have you ensured to have an _absolutely_ up-to-date voice file? The format changed recently, so it's highly possible this is simply caused by the voice file (and thus not a bug per se).
Comment by Davy Kager (DavyKager) - Tuesday, 07 August 2007, 15:21 GMT
This bug is also reproducable on the iAudio X5 with today's build (including the automatically built voicefile from the daily builds page). So it doesn't seem to be target-specific.
Comment by James Teh (jteh) - Wednesday, 08 August 2007, 12:25 GMT
Upon further investigation of the code, I think I understand what is causing the problem, but am uncertain of the solution.

I *think* the problem was caused by r13851 (Rearrange and clean up settings code). Explanation follows:
* The recording settings (in menus/recording_menu.c) still use the old set_option() function.
* For recording settings such as recording source (which is handled by recsource_func), this is not a problem because the choices are LANG IDs, both for display and voice. set_option() handles this nicely.
* For recording settings such as frequency (handled by recfrequency_func), the strings to display are constants, but the voice IDs are TALK_IDs. set_option() only copies the display string and not the voice string, so in this case, there is nothign to voice, as constant strings aren't voiceable. In other words, the voice ID is disregarded by set_option().

I can't quite work out why set_option() uses cfg_vals for the title, rather than using cfg_vals for the text of the items to display. I know that cfg_vals is meant to store the config value names, but it seems that this is handled elsewhere in settings_list.c. Basically, this is where i start getting really confused. :)