Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Float32 to Int16 in StereoAudioRecorderHelper.js #176

Open
crky14 opened this issue Oct 29, 2019 · 0 comments
Open

Float32 to Int16 in StereoAudioRecorderHelper.js #176

crky14 opened this issue Oct 29, 2019 · 0 comments

Comments

@crky14
Copy link

crky14 commented Oct 29, 2019

Current implementation is multiplying Float32 number in range (-1,1) by 0xFFFF which is eqvivalent to 65535. I found that with this conversion data is incorrect.

By som googling I found that using this:

num < 0 ? num * 0x8000 : num * 0x7FFF;

Im getting results equivalent to numpy implementation.

Is this a issue or I got something wrong ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant