@@ -110,7 +110,7 @@ static MBROLA_TAB *mbrola_tab = NULL; | |||
static int mbrola_control = 0; | |||
static int mbr_name_prefix = 0; | |||
espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int srate) | |||
espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int *srate) | |||
{//=================================================================================== | |||
// Load a phoneme name translation table from espeak-data/mbrola | |||
@@ -189,9 +189,8 @@ espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int | |||
fclose(f_in); | |||
setVolumeRatio_MBR((float)(mbrola_control & 0xff) /16.0f); | |||
// srate = getFreq_MBR(); | |||
samplerate = srate; | |||
if(srate == 22050) | |||
samplerate = *srate = getFreq_MBR(); | |||
if(*srate == 22050) | |||
SetParameter(espeakVOICETYPE,0,0); | |||
else | |||
SetParameter(espeakVOICETYPE,1,0); |
@@ -565,7 +565,7 @@ extern SOUND_ICON soundicon_tab[N_SOUNDICON_TAB]; | |||
espeak_ERROR SetVoiceByName(const char *name); | |||
espeak_ERROR SetVoiceByProperties(espeak_VOICE *voice_selector); | |||
espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int srate); | |||
espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int *srate); | |||
void SetParameter(int parameter, int value, int relative); | |||
int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbrola); | |||
int MbrolaGenerate(PHONEME_LIST *phoneme_list, int *n_ph, int resume); |
@@ -994,7 +994,7 @@ voice_t *LoadVoice(const char *vname, int control) | |||
name2[0] = 0; | |||
sscanf(p,"%s %s %d",name1,name2,&srate); | |||
if(LoadMbrolaTable(name1,name2,srate) != EE_OK) | |||
if(LoadMbrolaTable(name1,name2,&srate) != EE_OK) | |||
{ | |||
fprintf(stderr,"mbrola voice not found\n"); | |||
} |