Skip to content

Document usage with Float32Array / AudioBuffer#81

Open
cdauth wants to merge 1 commit into
zhuker:masterfrom
beatboxjs:master
Open

Document usage with Float32Array / AudioBuffer#81
cdauth wants to merge 1 commit into
zhuker:masterfrom
beatboxjs:master

Conversation

@cdauth
Copy link
Copy Markdown

@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
Copy Markdown

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