Diff of /trunk/src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 245 by harbaum, Tue Dec 15 19:54:04 2009 UTC revision 246 by harbaum, Tue Jan 19 20:26:37 2010 UTC
# Line 31  Line 31 
31  #include "custom_rating_renderer.h"  #include "custom_rating_renderer.h"
32  #include "custom_type_renderer.h"  #include "custom_type_renderer.h"
33    
34    #ifdef ESPEAK
35    #include <espeak/speak_lib.h>
36    #endif
37    
38  #ifdef USE_MAEMO  #ifdef USE_MAEMO
39  #include <hildon/hildon-banner.h>  #include <hildon/hildon-banner.h>
40  #if MAEMO_VERSION_MAJOR >= 5  #if MAEMO_VERSION_MAJOR >= 5
# Line 2053  void cleanup(appdata_t *appdata) { Line 2057  void cleanup(appdata_t *appdata) {
2057    
2058    gpx_free_all(appdata->gpx);    gpx_free_all(appdata->gpx);
2059    
2060    #ifdef ESPEAK
2061      espeak_Terminate();
2062    #endif
2063    
2064  #ifdef USE_STACKABLE_WINDOW  #ifdef USE_STACKABLE_WINDOW
2065    if(appdata->export_menu) submenu_cleanup(appdata->export_menu);    if(appdata->export_menu) submenu_cleanup(appdata->export_menu);
2066    if(appdata->tools_menu)  submenu_cleanup(appdata->tools_menu);    if(appdata->tools_menu)  submenu_cleanup(appdata->tools_menu);
# Line 2383  int main(int argc, char *argv[]) { Line 2391  int main(int argc, char *argv[]) {
2391    
2392    curl_global_init(CURL_GLOBAL_ALL);    curl_global_init(CURL_GLOBAL_ALL);
2393    
2394    #ifdef ESPEAK
2395    #if ESPEAK_API_REVISION == 1
2396      appdata.espeak.sample_rate =
2397        espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 512, NULL);
2398    #else
2399      appdata.espeak.sample_rate =
2400        espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 512, NULL, 0);
2401    #endif
2402      if(appdata.espeak.sample_rate < 0)
2403        printf("espeak: init error\n");
2404      else
2405        printf("espeak: running at %dhz\n", appdata.espeak.sample_rate);
2406    
2407      /* set language */
2408      espeak_VOICE voice_spec;
2409      voice_spec.name = NULL;
2410      voice_spec.languages = _("en");
2411      voice_spec.gender = 0;
2412      voice_spec.age = 0;
2413      voice_spec.variant = 0;
2414      if(EE_OK != espeak_SetVoiceByProperties(&voice_spec)) {
2415        printf("failed to set voice spec for %s\n", voice_spec.languages);
2416        appdata.espeak.sample_rate = -1;
2417      }
2418    #endif
2419    
2420  #ifdef USE_MAEMO  #ifdef USE_MAEMO
2421    printf("Installing osso context for \"org.harbaum." APP "\"\n");    printf("Installing osso context for \"org.harbaum." APP "\"\n");
2422    appdata.osso_context = osso_initialize("org.harbaum."APP,    appdata.osso_context = osso_initialize("org.harbaum."APP,
# Line 2470  int main(int argc, char *argv[]) { Line 2504  int main(int argc, char *argv[]) {
2504    
2505    appdata.gconf_client = gconf_client_get_default();    appdata.gconf_client = gconf_client_get_default();
2506    gconf_load_state(&appdata);    gconf_load_state(&appdata);
2507    
2508    gps_init(&appdata);    gps_init(&appdata);
2509    
2510    appdata.cur_view = gpxlist_create_view_and_model(&appdata, NULL);    appdata.cur_view = gpxlist_create_view_and_model(&appdata, NULL);

Legend:
Removed from v.245  
changed lines
  Added in v.246