home | |||
links |
|
||
developer's mag main page article part 1 part 2 part 3 part 4 part 5 part 6 part 7 part 8 part 9 |
8 - Jingle Lists
The demo program gets the total jingles, and then calls piezo_name_jingle() to get each jingle's name: int piezo_name_jingle(unsigned int idx, char *name, size_t nbytes); The index is used the same as with the other calls. The name parameter is a pointer to a char array, and nbytes is the maximum size of the array. The result is a return value of zero, and the jingle name in the 'name' array, or -1 for an error. The demo program generates and displays this list, allowing it to be picked from - the choice is then played using piezo_play_jingle(). In like manner, a program can customize its audio prompts by displaying a list and letting the user select, making for a nice configuration option. Previous Section Next Section |
||
Copyright © 2001-2006 ebmDevMag.com - Legal Notice |