question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RangeError: Source is too large

See original GitHub issue

I 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)
screen shot 2018-03-22 at 12 04 13 pm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Alynvacommented, Jul 17, 2018

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…

0reactions
jaggadcommented, Jul 18, 2018

Fixed by #6

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found