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

Uncaught RangeError: Invalid array buffer length #8

Open
lightmar opened this issue Dec 14, 2014 · 5 comments
Open

Uncaught RangeError: Invalid array buffer length #8

lightmar opened this issue Dec 14, 2014 · 5 comments

Comments

@lightmar
Copy link

Hi,

Thank you for this great plugin.
Unfortunately I have a problem which I can't figure out.
On some computers it works great, however on others when the recorded wav is passed to the libmp3lame, to I get the following error:
Uncaught RangeError: Invalid array buffer length

I have discovered that the error occurs only when a user records microphone with a high sample rate of 192000. When I try it on my mac with 44000 input, it works.

How can it be fixed? Very important issue...

Thanks

@nusofthq
Copy link
Contributor

This is a limitation of the javascript mp3 library.

You can try and recompile the library using emscripten: http://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html, and increase the buffer size, but i don't know exactly what results you will get. In anyway 44000 or 48000 sample rate is more than enough for a mono mp3.

@lightmar
Copy link
Author

I don't mind converting in 44000 or 48000. The question is how I can convert the recorded audio to lower sample rate?

Thanks

@lightmar
Copy link
Author

How is it possible to make this plugin work for all devices?
It just doesn't work on PCs on which the recording configuration is high like 192000.
I will appreciate any help.

@michelboudali
Copy link

@lightmar did you find how to reduce the sample rate?

@z-shan
Copy link

z-shan commented Sep 20, 2016

@lightmar @michelboudali yeah it doesnt work for me too on windows machine when i try to record in 32kbps bitrate. 64kbps works on windows and 32 works on mac..
any fix for this. I would like to record with 32kbps to keep the size low.

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

3 participants