Using opus_int16 instead of short in LPCNet code

This commit is contained in:
Jean-Marc Valin 2023-06-22 18:06:38 -04:00
parent abe817c3fc
commit b64a89feca
No known key found for this signature in database
GPG key ID: 531A52533318F00A
7 changed files with 36 additions and 46 deletions

View file

@ -232,7 +232,7 @@ void lpcnet_reset_signal(LPCNetState *lpcnet)
RNN_CLEAR(lpcnet->nnet.gru_b_state, GRU_B_STATE_SIZE);
}
void lpcnet_synthesize_tail_impl(LPCNetState *lpcnet, short *output, int N, int preload)
void lpcnet_synthesize_tail_impl(LPCNetState *lpcnet, opus_int16 *output, int N, int preload)
{
int i;
@ -270,12 +270,12 @@ void lpcnet_synthesize_tail_impl(LPCNetState *lpcnet, short *output, int N, int
}
}
void lpcnet_synthesize_impl(LPCNetState *lpcnet, const float *features, short *output, int N, int preload)
void lpcnet_synthesize_impl(LPCNetState *lpcnet, const float *features, opus_int16 *output, int N, int preload)
{
run_frame_network(lpcnet, lpcnet->gru_a_condition, lpcnet->gru_b_condition, lpcnet->lpc, features);
lpcnet_synthesize_tail_impl(lpcnet, output, N, preload);
}
void lpcnet_synthesize(LPCNetState *lpcnet, const float *features, short *output, int N) {
void lpcnet_synthesize(LPCNetState *lpcnet, const float *features, opus_int16 *output, int N) {
lpcnet_synthesize_impl(lpcnet, features, output, N, 0);
}