@thi.ng/dsp-io-wav 2.1.77 → 2.1.79

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/package.json +10 -10
  3. package/write.js +8 -8
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2023-11-09T10:28:18Z
3
+ - **Last updated**: 2023-11-24T09:35:46Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/dsp-io-wav",
3
- "version": "2.1.77",
3
+ "version": "2.1.79",
4
4
  "description": "WAV file format generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -33,19 +33,19 @@
33
33
  "test": "bun test"
34
34
  },
35
35
  "dependencies": {
36
- "@thi.ng/api": "^8.9.8",
37
- "@thi.ng/binary": "^3.3.37",
38
- "@thi.ng/errors": "^2.4.2",
39
- "@thi.ng/transducers": "^8.8.10",
40
- "@thi.ng/transducers-binary": "^2.1.77"
36
+ "@thi.ng/api": "^8.9.9",
37
+ "@thi.ng/binary": "^3.3.38",
38
+ "@thi.ng/errors": "^2.4.3",
39
+ "@thi.ng/transducers": "^8.8.12",
40
+ "@thi.ng/transducers-binary": "^2.1.79"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.38.2",
44
- "@thi.ng/testament": "^0.4.1",
43
+ "@microsoft/api-extractor": "^7.38.3",
44
+ "@thi.ng/testament": "^0.4.2",
45
45
  "rimraf": "^5.0.5",
46
46
  "tools": "^0.0.1",
47
47
  "typedoc": "^0.25.3",
48
- "typescript": "^5.2.2"
48
+ "typescript": "^5.3.2"
49
49
  },
50
50
  "keywords": [
51
51
  "8bit",
@@ -88,5 +88,5 @@
88
88
  "parent": "@thi.ng/dsp",
89
89
  "year": 2020
90
90
  },
91
- "gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
91
+ "gitHead": "f6de41f4991704fdbbb2899bb430ed4f4f6efab0\n"
92
92
  }
package/write.js CHANGED
@@ -19,18 +19,18 @@ export const wavHeader = (spec) => {
19
19
  const blockAlign = spec.channels * bytesPerSample;
20
20
  const dataLength = spec.length * blockAlign;
21
21
  return [
22
- u32(0x52494646, false),
23
- u32(dataLength + HEADER_SIZE - 8, true),
24
- u32(0x57415645, false),
25
- u32(0x666d7420, false),
26
- u32(16, true),
27
- u16(1, true),
22
+ u32(0x52494646, false), // 'RIFF'
23
+ u32(dataLength + HEADER_SIZE - 8, true), // riff len
24
+ u32(0x57415645, false), // 'WAVE'
25
+ u32(0x666d7420, false), // 'fmt '
26
+ u32(16, true), // fmt len,
27
+ u16(1, true), // audio format id
28
28
  u16(spec.channels, true),
29
29
  u32(spec.sampleRate, true),
30
- u32(spec.sampleRate * blockAlign, true),
30
+ u32(spec.sampleRate * blockAlign, true), // byte rate
31
31
  u16(blockAlign, true),
32
32
  u16(spec.bits, true),
33
- u32(0x64617461, false),
33
+ u32(0x64617461, false), // 'data'
34
34
  u32(dataLength, true),
35
35
  ];
36
36
  };