mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-05 16:03:09 +00:00
code clanup: remove unused samplerate_native
This commit is contained in:
@@ -1103,9 +1103,9 @@ static int LoadWavefile(CompileContext *ctx, FILE *f, const char *fname)
|
||||
sr2 = Read4Bytes(f);
|
||||
fseek(f, 40, SEEK_SET);
|
||||
|
||||
if ((sr1 != samplerate_native) || (sr2 != sr1*2)) {
|
||||
if (sr1 != samplerate_native)
|
||||
error(ctx, "Can't resample (%d to %d): %s", sr1, samplerate_native, fname);
|
||||
if ((sr1 != samplerate) || (sr2 != sr1*2)) {
|
||||
if (sr1 != samplerate)
|
||||
error(ctx, "Can't resample (%d to %d): %s", sr1, samplerate, fname);
|
||||
else
|
||||
error(ctx, "WAV file is not mono: %s", fname);
|
||||
return 0;
|
||||
@@ -2370,7 +2370,7 @@ espeak_ng_CompilePhonemeDataPath(long rate,
|
||||
sprintf(phdst, "%s", path_home);
|
||||
}
|
||||
|
||||
samplerate_native = samplerate = rate;
|
||||
samplerate = rate;
|
||||
LoadPhData(NULL, NULL);
|
||||
if (LoadVoice("", 8/*compiling phonemes*/) == NULL) {
|
||||
clean_context(ctx);
|
||||
@@ -2449,7 +2449,7 @@ espeak_ng_CompilePhonemeDataPath(long rate,
|
||||
|
||||
// write a word so that further data doesn't start at displ=0
|
||||
Write4Bytes(ctx->f_phdata, version_phdata);
|
||||
Write4Bytes(ctx->f_phdata, samplerate_native);
|
||||
Write4Bytes(ctx->f_phdata, samplerate);
|
||||
Write4Bytes(ctx->f_phindex, version_phdata);
|
||||
|
||||
memset(ctx->ref_hash_tab, 0, sizeof(ctx->ref_hash_tab));
|
||||
|
||||
Reference in New Issue
Block a user