diff --git a/src/lpcnet.c b/src/lpcnet.c index df66e96..a5c8cbc 100644 --- a/src/lpcnet.c +++ b/src/lpcnet.c @@ -134,7 +134,7 @@ void lpcnet_open_test_file(LPCNetState *lpcnet, char file_name[]) { } } -void lpcnet_synthesize(LPCNetState *lpcnet, short *output, const float *features, int N) +void lpcnet_synthesize(LPCNetState *lpcnet, short *output, const float *features, int N, int logmag) { static int count = 0; int i; @@ -156,12 +156,12 @@ void lpcnet_synthesize(LPCNetState *lpcnet, short *output, const float *features memmove(lpcnet->old_lpc[1], lpcnet->old_lpc[0], (FEATURES_DELAY-1)*LPC_ORDER*sizeof(lpc[0])); if (logmag) { - float tmp[NB_BANDS]; - for (i=0;iold_lpc[0], tmp); + float tmp[NB_BANDS]; + for (i=0;iold_lpc[0], tmp); } else - lpc_from_cepstrum(lpcnet->old_lpc[0], features); + lpc_from_cepstrum(lpcnet->old_lpc[0], features); if (lpcnet->ftest) { float pitch_f = pitch; diff --git a/src/lpcnet_dump.c b/src/lpcnet_dump.c index 3afaf1a..077c6dc 100644 --- a/src/lpcnet_dump.c +++ b/src/lpcnet_dump.c @@ -243,7 +243,7 @@ void lpcnet_dump(LPCNET_DUMP *d, float x[], float features[]) c2_Sn[i+c2_Sn_size-c2_frame_size] = x[i]; float f0, voicing, snr; int pitch_index; - pitch_index = codec2_pitch_est(d->c2pitch, c2_Sn, &f0, &voicing), &snr; + pitch_index = codec2_pitch_est(d->c2pitch, c2_Sn, &f0, &voicing, &snr); if (pitch_index >= 2*PITCH_MAX_PERIOD) pitch_index = 2*PITCH_MAX_PERIOD-1; if (pitch_index < 2*PITCH_MIN_PERIOD) pitch_index = 2*PITCH_MIN_PERIOD; diff --git a/src/test_lpcnet.c b/src/test_lpcnet.c index 1f1edd5..dc023fc 100644 --- a/src/test_lpcnet.c +++ b/src/test_lpcnet.c @@ -41,10 +41,10 @@ int main(int argc, char **argv) { int o = 0; int opt_idx = 0; while( o != -1 ) { - static struct option long_opts[] = { - {"mag", no_argument,0, 'i'}, - {0, 0, 0, 0} - }; + static struct option long_opts[] = { + {"mag", no_argument,0, 'i'}, + {0, 0, 0, 0} + }; o = getopt_long(argc,argv,"ih",long_opts,&opt_idx);