From: <gau...@us...> - 2010-03-27 18:21:07
|
Revision: 3088 http://navit.svn.sourceforge.net/navit/?rev=3088&view=rev Author: gauthier60 Date: 2010-03-27 18:21:00 +0000 (Sat, 27 Mar 2010) Log Message: ----------- Pour compilation sur plateforme WindowsXP avec minGW Modified Paths: -------------- trunk/navit/navit/support/espeak/espeak.c trunk/navit/navit/support/espeak/espeak_command.h trunk/navit/navit/support/espeak/speak_lib.c trunk/navit/navit/support/espeak/speak_lib.h trunk/navit/navit/support/espeak/speech.h Modified: trunk/navit/navit/support/espeak/espeak.c =================================================================== --- trunk/navit/navit/support/espeak/espeak.c 2010-03-27 16:17:49 UTC (rev 3087) +++ trunk/navit/navit/support/espeak/espeak.c 2010-03-27 18:21:00 UTC (rev 3088) @@ -382,7 +382,7 @@ case 'h': printf("\n"); - printf("eSpeak text-to-speech: %s\n%s",espeak_Info(NULL),help_text); + printf("eSpeak text-to-speech: %s\n%s",espeak_Info(),help_text); exit(0); break; Modified: trunk/navit/navit/support/espeak/espeak_command.h =================================================================== --- trunk/navit/navit/support/espeak/espeak_command.h 2010-03-27 16:17:49 UTC (rev 3087) +++ trunk/navit/navit/support/espeak/espeak_command.h 2010-03-27 18:21:00 UTC (rev 3088) @@ -19,7 +19,7 @@ ET_TERMINATED_MSG }; -typedef struct +typedef struct { unsigned int unique_identifier; void* text; @@ -31,7 +31,7 @@ void* user_data; } t_espeak_text; -typedef struct +typedef struct { unsigned int unique_identifier; void* text; @@ -42,53 +42,53 @@ void* user_data; } t_espeak_mark; -typedef struct +typedef struct { unsigned int unique_identifier; void* user_data; - wchar_t character; + wchar_t character; } t_espeak_character; -typedef struct +typedef struct { unsigned int unique_identifier; void* user_data; - const char* key_name; + const char* key_name; } t_espeak_key; -typedef struct +typedef struct { unsigned int unique_identifier; void* user_data; } t_espeak_terminated_msg; -typedef struct +typedef struct { - espeak_PARAMETER parameter; - int value; + espeak_PARAMETER parameter; + int value; int relative; } t_espeak_parameter; -enum t_command_state +enum t_command_state { CS_UNDEFINED, // The command has just been created CS_PENDING, // stored in the fifo CS_PROCESSED // processed }; -typedef struct +typedef struct { enum t_espeak_type type; - t_command_state state; + enum t_command_state state; union command { - t_espeak_text my_text; - t_espeak_mark my_mark; - t_espeak_key my_key; - t_espeak_character my_char; + t_espeak_text my_text; + t_espeak_mark my_mark; + t_espeak_key my_key; + t_espeak_character my_char; t_espeak_parameter my_param; const wchar_t* my_punctuation_list; const char *my_voice_name; @@ -123,11 +123,11 @@ void display_espeak_command(t_espeak_command* the_command); -espeak_ERROR sync_espeak_Synth(unsigned int unique_identifier, const void *text, size_t size, - unsigned int position, espeak_POSITION_TYPE position_type, +espeak_ERROR sync_espeak_Synth(unsigned int unique_identifier, const void *text, size_t size, + unsigned int position, espeak_POSITION_TYPE position_type, unsigned int end_position, unsigned int flags, void* user_data); -espeak_ERROR sync_espeak_Synth_Mark(unsigned int unique_identifier, const void *text, size_t size, - const char *index_mark, unsigned int end_position, +espeak_ERROR sync_espeak_Synth_Mark(unsigned int unique_identifier, const void *text, size_t size, + const char *index_mark, unsigned int end_position, unsigned int flags, void* user_data); void sync_espeak_Key(const char *key); void sync_espeak_Char(wchar_t character); Modified: trunk/navit/navit/support/espeak/speak_lib.c =================================================================== --- trunk/navit/navit/support/espeak/speak_lib.c 2010-03-27 16:17:49 UTC (rev 3087) +++ trunk/navit/navit/support/espeak/speak_lib.c 2010-03-27 18:21:00 UTC (rev 3088) @@ -31,7 +31,9 @@ #include "speech.h" #include <sys/stat.h> -#ifndef PLATFORM_WINDOWS +#ifdef PLATFORM_WINDOWS +#include <windows.h> +#else #include <unistd.h> #endif @@ -526,8 +528,8 @@ ep->text_position = char_position & 0xffffff; ep->length = char_position >> 24; - time = (double(count_samples + mbrola_delay + (out_ptr - out_start)/2)*1000.0)/samplerate; - ep->audio_position = int(time); + time = ((double)(count_samples + mbrola_delay + (out_ptr - out_start)/2)*1000.0)/samplerate; + ep->audio_position = (int)(time); ep->sample = (count_samples + mbrola_delay + (out_ptr - out_start)/2); #ifdef DEBUG_ENABLED @@ -1144,7 +1146,7 @@ return EE_OK; } // end of espeak_Terminate -ESPEAK_API const char *espeak_Info(void *) +ESPEAK_API const char *espeak_Info(void) {//======================================= return(version_string); } Modified: trunk/navit/navit/support/espeak/speak_lib.h =================================================================== --- trunk/navit/navit/support/espeak/speak_lib.h 2010-03-27 16:17:49 UTC (rev 3087) +++ trunk/navit/navit/support/espeak/speak_lib.h 2010-03-27 18:21:00 UTC (rev 3088) @@ -594,7 +594,7 @@ #ifdef __cplusplus extern "C" #endif -const char *espeak_Info(void* ptr); +const char *espeak_Info(void); /* Returns the version number string. The parameter is for future use, and should be set to NULL */ Modified: trunk/navit/navit/support/espeak/speech.h =================================================================== --- trunk/navit/navit/support/espeak/speech.h 2010-03-27 16:17:49 UTC (rev 3087) +++ trunk/navit/navit/support/espeak/speech.h 2010-03-27 18:21:00 UTC (rev 3088) @@ -33,7 +33,7 @@ //#define USE_PORTAUDIO //#define USE_PULSEAUDIO #define USE_NANOSLEEP -#define ESPEAK_API extern "C" +//#define ESPEAK_API extern "C" #ifdef LIBRARY #define USE_ASYNC @@ -67,8 +67,10 @@ #ifdef PLATFORM_WINDOWS #define N_PATH_HOME 220 +#define ESPEAK_API #else #define N_PATH_HOME 150 +#define ESPEAK_API extern "C" #endif extern char path_home[N_PATH_HOME]; // this is the espeak-data directory This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |