|
navit
0.5.3-trunk
|
Go to the source code of this file.
Data Structures | |
| struct | speech_methods |
Functions | |
| struct speech * | speech_new (struct attr *parent, struct attr **attrs) |
| int | speech_say (struct speech *this_, const char *text) |
| int | speech_sayf (struct speech *this_, const char *format,...) |
| void | speech_destroy (struct speech *this_) |
| int | speech_get_attr (struct speech *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter) |
| Gets an attribute from a speech plugin. More... | |
| int | speech_set_attr (struct speech *this_, struct attr *attr) |
| Sets an attribute from an speech plugin. More... | |
| int | speech_estimate_duration (struct speech *this_, char *str) |
| Tries to estimate how long it will take to speak a certain string. More... | |
| void speech_destroy | ( | struct speech * | this_ | ) |
References speech_methods::destroy, speech::meth, navit_object_destroy(), and speech::priv.
Referenced by speech_new().
| int speech_estimate_duration | ( | struct speech * | this_, |
| char * | str | ||
| ) |
Tries to estimate how long it will take to speak a certain string.
This function tries to estimate how long it will take to speak a certain string passed in str. It relies on the "characters per second"-value passed from the configuration.
| this_ | The speech whose speed should be used |
| str | The string that should be estimated |
References attr::num, speech_get_attr(), attr::str, and attr::u.
| int speech_get_attr | ( | struct speech * | this_, |
| enum attr_type | type, | ||
| struct attr * | attr, | ||
| struct attr_iter * | iter | ||
| ) |
Gets an attribute from a speech plugin.
| this_ | The speech plugin the attribute should be read from |
| type | The type of the attribute to be read |
| attr | Pointer to an attrib-structure where the attribute should be written to |
| iter | (NOT IMPLEMENTED) Used to iterate through all attributes of a type. Set this to NULL to get the first attribute, set this to an attr_iter to get the next attribute |
References attr_generic_get_attr(), speech_default_attrs, and type.
Referenced by get_distance_str(), navigation_item_destination(), navit_cmd_announcer_toggle(), navit_say(), navit_speak(), osd_nav_toggle_announcer_draw(), and speech_estimate_duration().
References attr_search(), attr::attrs, dbg, lvl_debug, lvl_error, speech::meth, navit_object_new(), speech::priv, speech_methods::say, speech_destroy(), speech_func, attr::str, and attr::u.
| int speech_say | ( | struct speech * | this_, |
| const char * | text | ||
| ) |
Referenced by navit_say(), navit_speak(), and phrase_route_calc().
| int speech_sayf | ( | struct speech * | this_, |
| const char * | format, | ||
| ... | |||
| ) |
Referenced by phrase_route_calculated().
Sets an attribute from an speech plugin.
This sets an attribute of a speech plugin, overwriting an attribute of the same type if it already exists. This function also calls all the callbacks that are registred to be called when attributes change.
| this_ | The speech plugin to set the attribute of |
| attr | The attribute to set |
Referenced by navit_cmd_announcer_toggle().