]> err.no Git - mapper/commitdiff
Initialize the audio note subsystem
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 28 Feb 2008 14:35:11 +0000 (16:35 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 28 Feb 2008 14:35:11 +0000 (16:35 +0200)
src/mapper.c

index af39b4521ec3b34ea6b950ee23e7af09f9f7d295..84bbae47a89ab2084772900241f725cc88aa0328 100644 (file)
@@ -36,6 +36,7 @@
 #include <glib/gi18n.h>
 #ifdef WITH_GST
 #include <gst/gst.h>
+#include "audio-note.h"
 #endif
 #include <gtk/gtk.h>
 #include <fcntl.h>
@@ -202,9 +203,14 @@ config_save();
 config_save_repo();
 map_download_deinit();
 map_poi_deinit();
-#if defined (WITH_GST) && defined (WITH_ESPEAK)
+
+#if defined (WITH_GST) 
+#if defined (WITH_ESPEAK)
 speak_deinit();
 #endif
+audio_note_deinit();
+#endif
+
 gps_disconnect(_gps);
 gps_free(_gps);
 osm_deinit();
@@ -329,12 +335,16 @@ switch (mis) {
                w="OSM";
        break;
        case MAPPER_INIT_VOICE:
-               #if defined (WITH_GST) && defined (WITH_ESPEAK)
+#if defined (WITH_GST)
+               if (audio_note_init()==FALSE)
+                       g_printerr("Audio note init failed\n");                 
+#if defined (WITH_ESPEAK)
                if (speak_init("en",_voice_speed,_voice_pitch)==FALSE) {
                        g_printerr("Espeak init failed\n");
                        popup_error(_window, "Speech init failed. Disabled.");
                }
-               #endif
+#endif
+#endif
                mis=MAPPER_INIT_MISC;
                p=0.85;
                w="Speech";