music-metadata 7.13.1 → 7.13.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/lib/wav/WaveParser.js +6 -1
- package/package.json +1 -1
package/lib/wav/WaveParser.js
CHANGED
|
@@ -99,7 +99,12 @@ class WaveParser extends BasicParser_1.BasicParser {
|
|
|
99
99
|
this.metadata.setFormat('numberOfSamples', numberOfSamples);
|
|
100
100
|
this.metadata.setFormat('duration', numberOfSamples / this.metadata.format.sampleRate);
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
if (this.metadata.format.codec === 'ADPCM') { // ADPCM is 4 bits lossy encoding resulting in 352kbps
|
|
103
|
+
this.metadata.setFormat('bitrate', 352000);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
this.metadata.setFormat('bitrate', this.blockAlign * this.metadata.format.sampleRate * 8);
|
|
107
|
+
}
|
|
103
108
|
await this.tokenizer.ignore(header.chunkSize);
|
|
104
109
|
break;
|
|
105
110
|
case 'bext': // Broadcast Audio Extension chunk https://tech.ebu.ch/docs/tech/tech3285.pdf
|
package/package.json
CHANGED