resolved compile issues due to merge

pull/8/head^2
David 2019-07-27 11:25:00 +09:30
parent 55f1db3113
commit 70aded5485
3 changed files with 10 additions and 10 deletions

View File

@ -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;i<NB_BANDS;i++) tmp[i] = pow(10.f, features[i]);
lpc_from_bands(lpcnet->old_lpc[0], tmp);
float tmp[NB_BANDS];
for (i=0;i<NB_BANDS;i++) tmp[i] = pow(10.f, features[i]);
lpc_from_bands(lpcnet->old_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;

View File

@ -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;

View File

@ -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);