ERR_OUT_OF_RANGE error during raw uncompressed fingerprint generation
I used following code segment to generate raw uncompressed fingerprint for given sound clip. But fpcalc return following error.
internal/buffer.js:35
throw new ERR_OUT_OF_RANGE('value', >= ${min} and <= ${max}, value);
^
RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= -2147483648 and <= 2147483647. Received 4134789158
at checkInt (internal/buffer.js:35:11)
at writeU_Int32BE (internal/buffer.js:619:3)
at Buffer.writeInt32BE (internal/buffer.js:707:10)
at Stream.
I have node version 10. could you please help me to resolve this ? thank you.
Replace the test.js with this and it'll work
/* jshint node:true */
'use strict';
var path = require('path'),
fs = require('fs'),
test = require('tape'),
fpcalc = require('../');
var TEST_FILE = path.join(__dirname, 'test.mp3');
fpcalc(TEST_FILE, function (err, result) {
if (err) throw err;
console.log(result.file, result.duration, result.fingerprint);
});