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

RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 13203. Received 13204 #10

Open
teh0 opened this issue Jan 18, 2021 · 1 comment

Comments

@teh0
Copy link

teh0 commented Jan 18, 2021

Hello,

I am coding a web application and i need your libs to retrieve beats of youtube audio music. I encountered a problem when i pipe buffer on express response. Peaks are detected until 16652ms and beyond this limit, an error is thrown :

`node:internal/process/promises:227
triggerUncaughtException(err, true /* fromPromise */);
^

RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 13203. Received 13204
at new NodeError (node:internal/errors:278:15)
at boundsError (node:internal/buffer:84:9)
at Buffer.readInt16LE (node:internal/buffer:412:5)
at MusicBeatDetector._analyzeBuffer (/Users/teho/Sites/poc/audio/server/node_modules/music-beat-detector/src/MusicBeatDetector.js:41:27)
at DestroyableTransform._transform (/Users/teho/Sites/poc/audio/server/node_modules/music-beat-detector/src/MusicBeatDetector.js:31:7)
at DestroyableTransform.Transform._read (/Users/teho/Sites/poc/audio/server/node_modules/readable-stream/lib/_stream_transform.js:177:10)
at DestroyableTransform.Readable.read (/Users/teho/Sites/poc/audio/server/node_modules/readable-stream/lib/_stream_readable.js:456:10)
at flow (/Users/teho/Sites/poc/audio/server/node_modules/readable-stream/lib/_stream_readable.js:939:34)
at Speaker.pipeOnDrainFunctionResult (/Users/teho/Sites/poc/audio/server/node_modules/readable-stream/lib/_stream_readable.js:749:7)
at Speaker.emit (node:events:376:20) {
code: 'ERR_OUT_OF_RANGE'
}
[nodemon] app crashed - waiting for file changes before starting...`

My nodejs version is v15.5.1
I am a bit hard to understand the origin of the problem (I am a novice with Stream and Buffer) that is why I seek your assistance for this problem.
I remain at your disposal if you need complementary informations !

@chrvadala
Copy link
Owner

Locks like a wrong sample read, can you provide some more info to reproduce it?

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

2 participants