@remotion/media-utils
Advanced tools
Comparing version 2.0.7 to 2.0.8
@@ -14,8 +14,6 @@ "use strict"; | ||
if (Array.isArray(vector[0])) { | ||
//If input vector contains complex numbers | ||
// If input vector contains complex numbers | ||
return [[vector[0][0], vector[0][1]]]; | ||
} | ||
else { | ||
return [[vector[0], 0]]; | ||
} | ||
return [[vector[0], 0]]; | ||
} | ||
@@ -22,0 +20,0 @@ // Recurse: all even samples |
@@ -14,3 +14,3 @@ "use strict"; | ||
for (let j = 0; j < blockSize; j++) { | ||
sum = sum + Math.abs(audioBuffer[blockStart + j]); // find the sum of all the samples in the block | ||
sum += Math.abs(audioBuffer[blockStart + j]); // find the sum of all the samples in the block | ||
} | ||
@@ -22,3 +22,3 @@ filteredData.push(sum / blockSize); // divide the sum by the block size to get the average | ||
const normalizeData = (filteredData) => { | ||
const multiplier = Math.pow(Math.max(...filteredData), -1); | ||
const multiplier = Math.max(...filteredData) ** -1; | ||
return filteredData.map((n) => n * multiplier); | ||
@@ -25,0 +25,0 @@ }; |
{ | ||
"name": "@remotion/media-utils", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "Utility functions for audio and video", | ||
@@ -18,3 +18,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"remotion": "^2.0.7" | ||
"remotion": "^2.0.8" | ||
}, | ||
@@ -26,5 +26,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@jonny/eslint-config": "^2.1.210", | ||
"@types/node": "^14.14.14", | ||
"eslint": "^7.4.0", | ||
"@jonny/eslint-config": "^2.1.233", | ||
"@types/node": "^15.0.1", | ||
"eslint": "^7.25.0", | ||
"prettier": "^2.0.5", | ||
@@ -31,0 +31,0 @@ "prettier-plugin-organize-imports": "^1.1.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56066
648
Updatedremotion@^2.0.8