Skip to content

Commit

Permalink
Do proper saturation
Browse files Browse the repository at this point in the history
  • Loading branch information
jmvalin committed Dec 6, 2018
1 parent e058e81 commit 9290956
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lpcnet.c
Expand Up @@ -185,6 +185,8 @@ void lpcnet_synthesize(LPCNetState *lpcnet, short *output, const float *features
lpcnet->last_exc = exc;
pcm += PREEMPH*lpcnet->deemph_mem;
lpcnet->deemph_mem = pcm;
if (pcm<-32767) pcm = -32767;
if (pcm>32767) pcm = 32767;
output[i] = (int)floor(.5 + pcm);
}
start = 0;
Expand Down

0 comments on commit 9290956

Please sign in to comment.