RangeError: Source is too large
See original GitHub issueI tried to add 15 small (max length 5sec) .mp3 files. After that I got following error. How to solve this error?
Crunker.js:38 Uncaught (in promise) RangeError: Source is too large
at Float32Array.set (<anonymous>)
at buffers.map.buffer (Crunker.js:38)
at Array.map (<anonymous>)
at Crunker.concatAudio (Crunker.js:37)
at eval (eval at <anonymous> (bundle.min.js:44), <anonymous>:60:30)
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Source is too large, multiple Float32Arrays - Stack Overflow
produces an error "Uncaught RangeError: Source is too large". At a glance it looks like it's just a normal Float32Array with 16 elements, ......
Read more >Source is too large" in Chrome dev build (60.0.3100.0) · Issue ...
I can confirm this happens in Version 61.0.3141.7 (Official Build) dev (64-bit) also. On version <=59 works fine. Uncaught RangeError: Source is ......
Read more >RangeError: Source is too large - Ionic Forum
Hi, I'm new to Ionic and Javascript. I have a bluetooth serial application receiving data from a device that it is showed in...
Read more >Source is too large, multiple Float32Arrays-C++ - appsloveworld
Coding example for the question Emscripten Uncaught RangeError: Source is too large, multiple Float32Arrays-C++.
Read more >RangeError: invalid array length - JavaScript - MDN Web Docs
The JavaScript exception "Invalid array length" occurs when specifying an array length that is either negative, a floating number or exceeds ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After hours testing merge and concatenat functions, I found that simple lib. But my output file keep with the same stranger effect. For the simplicity of this lib, I decided to look into the code. Looking this issue, of concatenation, I saw that the output buffer was with 350207 of length for two samples with 190589 of length, what shuld result in a buffer with 381178 of length. Other thing that I observe, is that the sampleRate of my sample was 48k, the rate of the buffer was 44.1k and the length of the buffer is defined by the total duration os the samples multiplied by 44.1k. Changing the 44.1k to 48k, voy a la: worked!
I know that 44.1k is default, but I have more than 200 samples and for me, is more convenient keep the sources and adapt the code.
A possible soluction is use the sampleRate provide from the source (dynamic). Or just change the method to define the length of buffer (insted of use
_totalDuration()*sampleRate
, use just_totalLength()
). But, for now, I can’t work in it to make a PR.Oh, and the README code has little bugs…
Fixed by #6