Skip to content
Snippets Groups Projects
Commit 1dcd5732 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Do proper saturation

parent 771cc786
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment