Better rounding

This commit is contained in:
Jean-Marc Valin 2018-11-27 13:11:41 -05:00
parent 0ddfdfc7c0
commit 3c694db226
2 changed files with 18 additions and 15 deletions

View file

@ -101,7 +101,7 @@ for c in range(0, nb_frames):
fexc[0, 0, 0] = lin2ulaw(pcm[f*frame_size + i])
mem = coef*mem + pcm[f*frame_size + i]
#print(mem)
np.array([mem], dtype='int16').tofile(fout)
np.array([np.round(mem)], dtype='int16').tofile(fout)
skip = 0