music-metadata 8.1.1 → 8.1.2
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 +1 -2
- package/lib/wav/WaveParser.js +6 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
[](https://npmcharts.com/compare/music-metadata,jsmediatags,musicmetadata,node-id3,mp3-parser,id3-parser,wav-file-info?start=600)
|
|
5
5
|
[](https://coveralls.io/github/Borewit/music-metadata?branch=master)
|
|
6
6
|
[](https://app.codacy.com/app/Borewit/music-metadata?utm_source=github.com&utm_medium=referral&utm_content=Borewit/music-metadata&utm_campaign=Badge_Grade_Dashboard)
|
|
7
|
-
[](https://lgtm.com/projects/g/Borewit/music-metadata/alerts/)
|
|
7
|
+
[](https://github.com/Borewit/music-metadata/actions/workflows/codeql-analysis.yml)
|
|
9
8
|
[](https://deepscan.io/dashboard#view=project&tid=5165&pid=6938&bid=61821)
|
|
10
9
|
[](https://snyk.io/test/github/Borewit/music-metadata?targetFile=package.json)
|
|
11
10
|
[](https://discord.gg/KyBr6sb)
|
package/lib/wav/WaveParser.js
CHANGED
|
@@ -96,7 +96,12 @@ export class WaveParser extends BasicParser {
|
|
|
96
96
|
this.metadata.setFormat('numberOfSamples', numberOfSamples);
|
|
97
97
|
this.metadata.setFormat('duration', numberOfSamples / this.metadata.format.sampleRate);
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
if (this.metadata.format.codec === 'ADPCM') { // ADPCM is 4 bits lossy encoding resulting in 352kbps
|
|
100
|
+
this.metadata.setFormat('bitrate', 352000);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.metadata.setFormat('bitrate', this.blockAlign * this.metadata.format.sampleRate * 8);
|
|
104
|
+
}
|
|
100
105
|
await this.tokenizer.ignore(header.chunkSize);
|
|
101
106
|
break;
|
|
102
107
|
case 'bext': // Broadcast Audio Extension chunk https://tech.ebu.ch/docs/tech/tech3285.pdf
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "music-metadata",
|
|
3
3
|
"description": "Music metadata parser for Node.js, supporting virtual any audio and tag format.",
|
|
4
|
-
"version": "8.1.
|
|
4
|
+
"version": "8.1.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Borewit",
|
|
7
7
|
"url": "https://github.com/Borewit"
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"mime": "^3.0.0",
|
|
121
121
|
"mocha": "^10.1.0",
|
|
122
122
|
"npm-run-all": "^4.1.5",
|
|
123
|
-
"prettier": "^2.8.
|
|
123
|
+
"prettier": "^2.8.2",
|
|
124
124
|
"remark-cli": "^11.0.0",
|
|
125
125
|
"remark-preset-lint-recommended": "^6.1.2",
|
|
126
126
|
"ts-node": "^10.9.1",
|