Fix:Fixed speech output
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 4 Nov 2008 14:54:44 +0000 (14:54 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 4 Nov 2008 14:54:44 +0000 (14:54 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@1639 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit.c
navit/speech.c

index a03ee7c..74ba7d4 100644 (file)
@@ -936,7 +936,7 @@ navit_speak(struct navit *this_)
        if (map)
                mr=map_rect_new(map, NULL);
        if (mr) {
-               item=map_rect_get_item(mr);
+               while ((item=map_rect_get_item(mr)) && item->type == type_nav_position);
                if (item && item_attr_get(item, attr_navigation_speech, &attr)) {
                        speech_say(this_->speech, attr.u.str);
                        navit_textfile_debug_log(this_, "item=point_debug debug=\"speech_say('%s')\"", attr.u.str);
index 9037129..ba591f6 100644 (file)
@@ -33,7 +33,7 @@ struct speech *
 speech_new(struct attr *parent, struct attr **attrs) 
 {
        struct speech *this_;
-       struct speech_priv *(*speech_new)(const char *data, struct speech_methods *meth);
+       struct speech_priv *(*speech_new)(struct speech_methods *meth, struct attr **attrs);
        struct attr *type;
 
        type=attr_search(attrs, NULL, attr_type);
@@ -49,7 +49,7 @@ speech_new(struct attr *parent, struct attr **attrs)
                 return NULL;
        }
        this_=g_new0(struct speech, 1);
-       this_->priv=speech_new(attrs, &this_->meth);
+       this_->priv=speech_new(&this_->meth, attrs);
        dbg(1, "say=%p\n", this_->meth.say);
        dbg(1,"priv=%p\n", this_->priv);
        if (! this_->priv) {