Closed vlee78 closed 5 years ago
Thank you for your suggestion. Your idea is technically correct.
However, since my project is according to the Google style guide ( https://code.google.com/p/google-styleguide/ ), please modify your request from int nout = (x_length-1) / r + 1; to int nout = (x_length - 1) / r + 1;
After that, I will accept your idea and merge pull request.
Thanks to Dr. M.Morise, I have make the modification to conform the google code style.
Thank you very much for your effort. I merge your PR soon.
Compare with the world vocoder matlab implementation, when x_length is divisible with r, as it always add one, it exports the latest sample from the head expanded buffer to y[0]. This produces different results compare with the matlab simulation and I think the matlab result be the idea of the author. Following lines can both solve the problem and I prefer the second one. int nout = ceil(x_length / (float) r); int nout = (x_length-1) / r + 1;