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

Document usage with Float32Array / AudioBuffer #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cdauth
Copy link

@cdauth cdauth commented Apr 25, 2021

It seems that many people are running into problems when trying to use lamejs with a Float32Array. This kind of array is created by the WebAudio API, and I believe libmp3lame-js was also expecting that format.

The README does not really indicate what data format lamejs expects. That’s why I have added a section that explains what format is expected and how to convert a Float32Array to it. In the example I have used an Int32Array because using an Int16Array (like in the other examples) resulted in serious clipping for me.

As a further step, I think it would be nice if lamejs could deal with a Float32Array out of the box, which would save time and resources by making the mapping unnecessary.

@AnshVM
Copy link

AnshVM commented Jan 22, 2022

Thanks @cdauth .

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

Successfully merging this pull request may close these issues.

3 participants