@audio/decode-aiff 1.1.2 → 1.1.4

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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @audio/decode-aiff
2
2
 
3
3
  Decode AIFF and AIFF-C audio to PCM float samples.<br>
4
- Part of [audio-decode](https://github.com/audiojs/audio-decode).
4
+ Part of [decode](https://github.com/audiojs/decode).
5
5
 
6
6
  ## Install
7
7
 
package/decode-aiff.js CHANGED
@@ -19,12 +19,12 @@ const ULAW_TBL = new Int16Array(256)
19
19
  if (seg) val = (val + 256) << (seg - 1)
20
20
  ALAW_TBL[i] = (ax & 0x80) ? val : -val
21
21
 
22
- // mu-law
22
+ // mu-law (ITU-T G.711) — sign bit set ⇒ negative
23
23
  let ux = ~i & 0xFF
24
24
  seg = (ux >> 4) & 7
25
25
  val = ((ux & 0x0F) << 3) + 132
26
26
  val <<= seg
27
- ULAW_TBL[i] = (ux & 0x80) ? (val - 132) : -(val - 132)
27
+ ULAW_TBL[i] = (ux & 0x80) ? (132 - val) : (val - 132)
28
28
  }
29
29
  })()
30
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/decode-aiff",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Decode AIFF/AIFF-C audio to PCM samples",
5
5
  "type": "module",
6
6
  "main": "decode-aiff.js",