Merge commit 'e4854a9cd6' into android

Conflicts:
	src/voices.cpp
This commit is contained in:
Reece H. Dunn
2013-03-13 20:55:49 +00:00
38 changed files with 1442 additions and 1169 deletions
+18 -18
View File
@@ -410,7 +410,7 @@ void VoiceReset(int tone_only)
voice->voicing = 64;
voice->consonant_amp = 100;
voice->consonant_ampv = 100;
voice->samplerate = 22050;
voice->samplerate = samplerate_native;
memset(voice->klattv,0,sizeof(voice->klattv));
speed.fast_settings[0] = 450;
@@ -674,24 +674,24 @@ voice_t *LoadVoice(const char *vname, int control)
if(tone_only)
break;
priority = DEFAULT_LANGUAGE_PRIORITY;
language_name[0] = 0;
sscanf(p,"%s %d",language_name,&priority);
if(strcmp(language_name,"variant") == 0)
break;
len = strlen(language_name) + 2;
// check for space in languages[]
if(len < (sizeof(voice_languages)-langix-1))
{
voice_languages[langix] = priority;
strcpy(&voice_languages[langix+1],language_name);
langix += len;
}
// only act on the first language line
if(language_set == 0)
{
@@ -701,10 +701,10 @@ voice_t *LoadVoice(const char *vname, int control)
strcpy(new_dictionary,language_type);
strcpy(phonemes_name,language_type);
SelectPhonemeTableName(phonemes_name);
if(new_translator != NULL)
DeleteTranslator(new_translator);
new_translator = SelectTranslator(translator_name);
langopts = &new_translator->langopts;
}
@@ -1059,10 +1059,10 @@ static char *ExtractVoiceVariantName(char *vname, int variant_num, int add_dir)
{
// voice variant name, not number
sprintf(variant_name, "%s%s", variant_prefix, p);
}
}
}
}
if(variant_num > 0)
{
if(variant_num < 10)
@@ -1421,13 +1421,13 @@ char const *SelectVoice(espeak_VOICE *voice_select, int *found)
{
// no language is specified. Get language from the named voice
static char buf[60];
if(voice_select2.name == NULL)
{
if((voice_select2.name = voice_select2.identifier) == NULL)
voice_select2.name = "default";
}
strncpy0(buf,voice_select2.name,sizeof(buf));
variant_name = ExtractVoiceVariantName(buf,0,0);
@@ -1492,7 +1492,7 @@ char const *SelectVoice(espeak_VOICE *voice_select, int *found)
}
if(skip==0)
{
voices2[ix2++] = vp;
voices2[ix2++] = vp;
}
for(j=0; (j < vp->xx1) && (n_variants < N_VOICE_VARIANTS);)
@@ -1579,10 +1579,10 @@ static void GetVoices(const char *path)
}
else
{
// a regular line, add it to the voices list
// a regular line, add it to the voices list
if((f_voice = fopen(fname,"r")) == NULL)
continue;
// pass voice file name within the voices directory
voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, &buf[20]);
fclose(f_voice);
@@ -1617,10 +1617,10 @@ static void GetVoices(const char *path)
else
if(ftype > 0)
{
// a regular line, add it to the voices list
// a regular line, add it to the voices list
if((f_voice = fopen(fname,"r")) == NULL)
continue;
// pass voice file name within the voices directory
voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, FindFileData.cFileName);
fclose(f_voice);
@@ -1660,7 +1660,7 @@ static void GetVoices(const char *path)
else
if(ftype > 0)
{
// a regular line, add it to the voices list
// a regular line, add it to the voices list
if((f_voice = fopen(fname,"r")) == NULL)
{
LOGE("Unble to load voice file '%s': %s", fname, strerror(errno));