@remotion/media-utils 4.0.273 → 4.0.274

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,14 +20,15 @@ const getInt16AsFloat = (bytes, offset) => {
20
20
  }
21
21
  const val1 = bytes[offset + 1];
22
22
  const val2 = bytes[offset];
23
- return ((val1 << 8) | val2) / 32768;
23
+ const int16 = (val1 << 8) | val2;
24
+ return ((int16 << 16) >> 16) / 32768;
24
25
  };
25
26
  exports.getInt16AsFloat = getInt16AsFloat;
26
27
  const getInt8AsFloat = (bytes, offset) => {
27
28
  if (offset >= bytes.length) {
28
29
  throw new Error(`Tried to read an 8-bit integer from offset ${offset} but the array length is ${bytes.length}`);
29
30
  }
30
- return (bytes[offset] - 128) / 128;
31
+ return bytes[offset] / 128;
31
32
  };
32
33
  exports.getInt8AsFloat = getInt8AsFloat;
33
34
  const probeWaveFile = async (src) => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/media-utils"
4
4
  },
5
5
  "name": "@remotion/media-utils",
6
- "version": "4.0.273",
6
+ "version": "4.0.274",
7
7
  "description": "Utilities for working with media files",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -13,7 +13,7 @@
13
13
  "url": "https://github.com/remotion-dev/remotion/issues"
14
14
  },
15
15
  "dependencies": {
16
- "remotion": "4.0.273"
16
+ "remotion": "4.0.274"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "react": ">=16.8.0",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "eslint": "9.19.0",
24
- "@remotion/eslint-config-internal": "4.0.273"
24
+ "@remotion/eslint-config-internal": "4.0.274"
25
25
  },
26
26
  "keywords": [
27
27
  "remotion",