diff options
author | gauthier60 <gauthier60@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-03-27 18:21:00 +0000 |
---|---|---|
committer | gauthier60 <gauthier60@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-03-27 18:21:00 +0000 |
commit | 6832ed4a0fcdf0f96ab3e47a790c585e1b1508b4 (patch) | |
tree | 7b6574f9d91ff665fd45c64a9a4ded4164dd7fbf | |
parent | 0e0455f39a9e96bdea4105d9e9902e3bffd1930e (diff) | |
download | navit-svn-6832ed4a0fcdf0f96ab3e47a790c585e1b1508b4.tar.gz |
Pour compilation sur plateforme WindowsXP avec minGW
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@3088 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | support/espeak/espeak.c | 2 | ||||
-rw-r--r-- | support/espeak/espeak_command.h | 42 | ||||
-rw-r--r-- | support/espeak/speak_lib.c | 10 | ||||
-rw-r--r-- | support/espeak/speak_lib.h | 2 | ||||
-rwxr-xr-x | support/espeak/speech.h | 4 |
5 files changed, 32 insertions, 28 deletions
diff --git a/support/espeak/espeak.c b/support/espeak/espeak.c index 5bb4429e..7997d067 100644 --- a/support/espeak/espeak.c +++ b/support/espeak/espeak.c @@ -382,7 +382,7 @@ int main (int argc, char **argv) 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; diff --git a/support/espeak/espeak_command.h b/support/espeak/espeak_command.h index 96f42b20..b2664be6 100644 --- a/support/espeak/espeak_command.h +++ b/support/espeak/espeak_command.h @@ -19,7 +19,7 @@ enum t_espeak_type ET_TERMINATED_MSG }; -typedef struct +typedef struct { unsigned int unique_identifier; void* text; @@ -31,7 +31,7 @@ typedef struct void* user_data; } t_espeak_text; -typedef struct +typedef struct { unsigned int unique_identifier; void* text; @@ -42,53 +42,53 @@ typedef struct 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 @@ int delete_espeak_command( t_espeak_command* the_command); 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); diff --git a/support/espeak/speak_lib.c b/support/espeak/speak_lib.c index 42381056..85c1b39a 100644 --- a/support/espeak/speak_lib.c +++ b/support/espeak/speak_lib.c @@ -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 @@ void MarkerEvent(int type, unsigned int char_position, int value, unsigned char 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 @@ ESPEAK_API espeak_ERROR espeak_Terminate(void) return EE_OK; } // end of espeak_Terminate -ESPEAK_API const char *espeak_Info(void *) +ESPEAK_API const char *espeak_Info(void) {//======================================= return(version_string); } diff --git a/support/espeak/speak_lib.h b/support/espeak/speak_lib.h index 2732434a..04482609 100644 --- a/support/espeak/speak_lib.h +++ b/support/espeak/speak_lib.h @@ -594,7 +594,7 @@ espeak_ERROR espeak_Terminate(void); #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 */ diff --git a/support/espeak/speech.h b/support/espeak/speech.h index cec86cf6..790b177d 100755 --- a/support/espeak/speech.h +++ b/support/espeak/speech.h @@ -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 @@ int LookupMnem(MNEM_TAB *table, char *string); #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 |