Don't hardcode the number of bands

This commit is contained in:
Jean-Marc Valin 2021-10-20 17:20:32 -04:00
parent b5b1d5013e
commit a9bf6cee8a
2 changed files with 5 additions and 3 deletions

View file

@ -89,7 +89,7 @@ void run_frame_network(LPCNetState *lpcnet, float *gru_a_condition, float *gru_b
int pitch;
float rc[LPC_ORDER];
/* Matches the Python code -- the 0.1 avoids rounding issues. */
pitch = (int)floor(.1 + 50*features[18]+100);
pitch = (int)floor(.1 + 50*features[NB_BANDS]+100);
pitch = IMIN(255, IMAX(33, pitch));
net = &lpcnet->nnet;
RNN_COPY(in, features, NB_FEATURES);