@openclaw/whatsapp 2026.9.35 → 2026.9.36
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/node_modules/baileys/node_modules/music-metadata/README.md +35 -32
- package/node_modules/baileys/node_modules/music-metadata/lib/ParserFactory.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ParserFactory.js +17 -13
- package/node_modules/baileys/node_modules/music-metadata/lib/aiff/AiffParser.js +19 -12
- package/node_modules/baileys/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/aiff/AiffToken.js +2 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/apev2/APEv2Parser.d.ts +4 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/apev2/APEv2Parser.js +59 -16
- package/node_modules/baileys/node_modules/music-metadata/lib/apev2/APEv2TagMapper.js +1 -0
- package/node_modules/baileys/node_modules/music-metadata/lib/apev2/APEv2Token.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/apev2/APEv2Token.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfGuid.js +56 -50
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfObject.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfObject.js +3 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfParser.js +15 -7
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfTagMapper.d.ts +3 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfTagMapper.js +21 -4
- package/node_modules/baileys/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/common/CombinedTagMapper.d.ts +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/common/CombinedTagMapper.js +6 -6
- package/node_modules/baileys/node_modules/music-metadata/lib/common/FourCC.js +3 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/common/GenericTagMapper.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/common/GenericTagTypes.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +3 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/common/MetadataCollector.js +28 -9
- package/node_modules/baileys/node_modules/music-metadata/lib/common/Util.js +25 -17
- package/node_modules/baileys/node_modules/music-metadata/lib/core.d.ts +4 -4
- package/node_modules/baileys/node_modules/music-metadata/lib/core.js +18 -11
- package/node_modules/baileys/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +29 -16
- package/node_modules/baileys/node_modules/music-metadata/lib/dsf/DsfChunk.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/dsf/DsfParser.js +3 -5
- package/node_modules/baileys/node_modules/music-metadata/lib/ebml/EbmlIterator.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ebml/EbmlIterator.js +35 -6
- package/node_modules/baileys/node_modules/music-metadata/lib/ebml/types.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ebml/types.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/flac/FlacParser.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/flac/FlacParser.js +6 -5
- package/node_modules/baileys/node_modules/music-metadata/lib/flac/FlacToken.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/flac/FlacToken.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v1/ID3v1Parser.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +212 -42
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js +5 -5
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/FrameHeader.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/FrameHeader.js +8 -5
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +2 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/FrameParser.js +53 -22
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +3 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/ID3v2ChapterToken.js +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +32 -16
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/ID3v2Token.d.ts +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +2 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/index.js +6 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/lrc/LyricsParser.js +3 -5
- package/node_modules/baileys/node_modules/music-metadata/lib/matroska/MatroskaDtd.js +7 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/matroska/MatroskaParser.js +22 -11
- package/node_modules/baileys/node_modules/music-metadata/lib/matroska/types.d.ts +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/Atom.d.ts +4 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/Atom.js +44 -11
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/AtomToken.js +30 -8
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +2 -0
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/MP4Parser.js +79 -54
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/MP4TagMapper.d.ts +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/mpeg/MpegLoader.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/mpeg/MpegParser.js +41 -19
- package/node_modules/baileys/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.d.ts +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/mpeg/XingTag.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/musepack/MusepackParser.js +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/musepack/sv7/BitReader.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.js +4 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/musepack/sv7/StreamVersion7.js +3 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.js +7 -5
- package/node_modules/baileys/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/OggParser.js +16 -12
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/OggToken.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/opus/OpusStream.d.ts +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/opus/OpusStream.js +8 -4
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +2 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/theora/TheoraStream.d.ts +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +3 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +14 -9
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +4 -0
- package/node_modules/baileys/node_modules/music-metadata/lib/riff/RiffChunk.d.ts +3 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/riff/RiffChunk.js +3 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/riff/RiffInfoTagMap.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/type.d.ts +3 -3
- package/node_modules/baileys/node_modules/music-metadata/lib/type.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/wav/WaveChunk.js +3 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/wav/WaveParser.d.ts +6 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/wav/WaveParser.js +75 -22
- package/node_modules/baileys/node_modules/music-metadata/lib/wavpack/WavPackParser.js +22 -13
- package/node_modules/baileys/node_modules/music-metadata/lib/wavpack/WavPackToken.js +3 -2
- package/node_modules/baileys/node_modules/music-metadata/package.json +3 -2
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as Token from 'token-types';
|
|
2
|
-
import { EndOfStreamError } from 'strtok3';
|
|
3
1
|
import initDebug from 'debug';
|
|
2
|
+
import { EndOfStreamError } from 'strtok3';
|
|
3
|
+
import * as Token from 'token-types';
|
|
4
4
|
import * as common from '../common/Util.js';
|
|
5
5
|
import { AbstractID3Parser } from '../id3v2/AbstractID3Parser.js';
|
|
6
|
-
import { InfoTagHeaderTag, LameEncoderVersion, readXingHeader } from './XingTag.js';
|
|
7
6
|
import { makeUnexpectedFileContentError } from '../ParseError.js';
|
|
7
|
+
import { InfoTagHeaderTag, LameEncoderVersion, readXingHeader } from './XingTag.js';
|
|
8
8
|
const debug = initDebug('music-metadata:parser:mpeg');
|
|
9
9
|
export class MpegContentError extends makeUnexpectedFileContentError('MPEG') {
|
|
10
10
|
}
|
|
@@ -31,7 +31,22 @@ const MPEG4 = {
|
|
|
31
31
|
* https://wiki.multimedia.cx/index.php/MPEG-4_Audio#Sampling_Frequencies
|
|
32
32
|
*/
|
|
33
33
|
SamplingFrequencies: [
|
|
34
|
-
96000,
|
|
34
|
+
96000,
|
|
35
|
+
88200,
|
|
36
|
+
64000,
|
|
37
|
+
48000,
|
|
38
|
+
44100,
|
|
39
|
+
32000,
|
|
40
|
+
24000,
|
|
41
|
+
22050,
|
|
42
|
+
16000,
|
|
43
|
+
12000,
|
|
44
|
+
11025,
|
|
45
|
+
8000,
|
|
46
|
+
7350,
|
|
47
|
+
null,
|
|
48
|
+
null,
|
|
49
|
+
null
|
|
35
50
|
]
|
|
36
51
|
/**
|
|
37
52
|
* Channel Configurations
|
|
@@ -87,14 +102,15 @@ class MpegFrameHeader {
|
|
|
87
102
|
this.isProtectedByCRC = !common.isBitSet(buf, off + 1, 7);
|
|
88
103
|
}
|
|
89
104
|
calcDuration(numFrames) {
|
|
90
|
-
return this.samplingRate == null ? null : (numFrames * this.calcSamplesPerFrame() / this.samplingRate
|
|
105
|
+
return this.samplingRate == null ? null : (numFrames * this.calcSamplesPerFrame()) / this.samplingRate;
|
|
91
106
|
}
|
|
92
107
|
calcSamplesPerFrame() {
|
|
93
108
|
return MpegFrameHeader.samplesInFrameTable[this.version === 1 ? 0 : 1][this.layer];
|
|
94
109
|
}
|
|
95
110
|
calculateSideInfoLength() {
|
|
96
|
-
if (this.layer !== 3)
|
|
111
|
+
if (this.layer !== 3) {
|
|
97
112
|
return 2;
|
|
113
|
+
}
|
|
98
114
|
if (this.channelModeIndex === 3) {
|
|
99
115
|
// mono
|
|
100
116
|
if (this.version === 1) {
|
|
@@ -153,7 +169,7 @@ class MpegFrameHeader {
|
|
|
153
169
|
}
|
|
154
170
|
}
|
|
155
171
|
parseAdtsHeader(buf, off) {
|
|
156
|
-
debug(
|
|
172
|
+
debug('layer=0 => ADTS');
|
|
157
173
|
this.version = this.versionIndex === 2 ? 4 : 2;
|
|
158
174
|
this.container = `ADTS/MPEG-${this.version}`;
|
|
159
175
|
const profileIndex = common.getBitAllignedNumber(buf, off + 2, 0, 2);
|
|
@@ -170,7 +186,8 @@ class MpegFrameHeader {
|
|
|
170
186
|
}
|
|
171
187
|
calcBitrate() {
|
|
172
188
|
if (this.bitrateIndex === 0x00 || // free
|
|
173
|
-
this.bitrateIndex ===
|
|
189
|
+
this.bitrateIndex === 0x0f) {
|
|
190
|
+
// reserved
|
|
174
191
|
return null;
|
|
175
192
|
}
|
|
176
193
|
if (this.version && this.bitrateIndex) {
|
|
@@ -180,13 +197,14 @@ class MpegFrameHeader {
|
|
|
180
197
|
return null;
|
|
181
198
|
}
|
|
182
199
|
calcSamplingRate() {
|
|
183
|
-
if (this.sampRateFreqIndex === 0x03 || this.version === null || this.sampRateFreqIndex == null)
|
|
200
|
+
if (this.sampRateFreqIndex === 0x03 || this.version === null || this.sampRateFreqIndex == null) {
|
|
184
201
|
return null; // 'reserved'
|
|
202
|
+
}
|
|
185
203
|
return MpegFrameHeader.sampling_rate_freq_index[this.version][this.sampRateFreqIndex];
|
|
186
204
|
}
|
|
187
205
|
}
|
|
188
|
-
MpegFrameHeader.SyncByte1 =
|
|
189
|
-
MpegFrameHeader.SyncByte2 =
|
|
206
|
+
MpegFrameHeader.SyncByte1 = 0xff;
|
|
207
|
+
MpegFrameHeader.SyncByte2 = 0xe0;
|
|
190
208
|
MpegFrameHeader.VersionID = [2.5, null, 2, 1];
|
|
191
209
|
MpegFrameHeader.LayerDescription = [0, 3, 2, 1];
|
|
192
210
|
MpegFrameHeader.ChannelMode = ['stereo', 'joint_stereo', 'dual_channel', 'mono'];
|
|
@@ -264,7 +282,7 @@ export class MpegParser extends AbstractID3Parser {
|
|
|
264
282
|
}
|
|
265
283
|
catch (err) {
|
|
266
284
|
if (err instanceof EndOfStreamError) {
|
|
267
|
-
debug(
|
|
285
|
+
debug('End-of-stream');
|
|
268
286
|
if (this.calculateEofDuration) {
|
|
269
287
|
if (this.samplesPerFrame !== null) {
|
|
270
288
|
const numberOfSamples = this.frameCount * this.samplesPerFrame;
|
|
@@ -292,7 +310,7 @@ export class MpegParser extends AbstractID3Parser {
|
|
|
292
310
|
if (format.duration && this.tokenizer.fileInfo.size) {
|
|
293
311
|
const mpegSize = this.tokenizer.fileInfo.size - this.mpegOffset - (hasID3v1 ? 128 : 0);
|
|
294
312
|
if (format.codecProfile && format.codecProfile[0] === 'V') {
|
|
295
|
-
this.metadata.setFormat('bitrate', mpegSize * 8 / format.duration);
|
|
313
|
+
this.metadata.setFormat('bitrate', (mpegSize * 8) / format.duration);
|
|
296
314
|
}
|
|
297
315
|
}
|
|
298
316
|
if (this.tokenizer.fileInfo.size && format.codecProfile === 'CBR') {
|
|
@@ -302,7 +320,7 @@ export class MpegParser extends AbstractID3Parser {
|
|
|
302
320
|
this.metadata.setFormat('numberOfSamples', numberOfSamples);
|
|
303
321
|
if (format.sampleRate && !format.duration) {
|
|
304
322
|
const duration = numberOfSamples / format.sampleRate;
|
|
305
|
-
debug(
|
|
323
|
+
debug('Calculate CBR duration based on file size: %s', duration);
|
|
306
324
|
this.metadata.setFormat('duration', duration);
|
|
307
325
|
}
|
|
308
326
|
}
|
|
@@ -318,7 +336,7 @@ export class MpegParser extends AbstractID3Parser {
|
|
|
318
336
|
throw new EndOfStreamError();
|
|
319
337
|
}
|
|
320
338
|
while (true) {
|
|
321
|
-
if (gotFirstSync && (this.syncPeek.buf[bo] &
|
|
339
|
+
if (gotFirstSync && (this.syncPeek.buf[bo] & 0xe0) === 0xe0) {
|
|
322
340
|
this.buf_frame_header[0] = MpegFrameHeader.SyncByte1;
|
|
323
341
|
this.buf_frame_header[1] = this.syncPeek.buf[bo];
|
|
324
342
|
await this.tokenizer.ignore(bo);
|
|
@@ -372,7 +390,9 @@ export class MpegParser extends AbstractID3Parser {
|
|
|
372
390
|
this.metadata.setFormat('lossless', false);
|
|
373
391
|
this.metadata.setFormat('sampleRate', header.samplingRate);
|
|
374
392
|
this.frameCount++;
|
|
375
|
-
return header.version !== null && header.version >= 2 && header.layer === 0
|
|
393
|
+
return header.version !== null && header.version >= 2 && header.layer === 0
|
|
394
|
+
? this.parseAdts(header)
|
|
395
|
+
: this.parseAudioFrameHeader(header);
|
|
376
396
|
}
|
|
377
397
|
/**
|
|
378
398
|
* @return {Promise<boolean>} true if parser should quit
|
|
@@ -391,7 +411,7 @@ export class MpegParser extends AbstractID3Parser {
|
|
|
391
411
|
debug(`samples_per_frame=${samples_per_frame}`);
|
|
392
412
|
const bps = samples_per_frame / 8.0;
|
|
393
413
|
if (header.bitrate !== null && header.samplingRate != null) {
|
|
394
|
-
const fsize = (bps * header.bitrate / header.samplingRate
|
|
414
|
+
const fsize = (bps * header.bitrate) / header.samplingRate + (header.padding ? slot_size : 0);
|
|
395
415
|
this.frame_size = Math.floor(fsize);
|
|
396
416
|
}
|
|
397
417
|
this.audioFrameHeader = header;
|
|
@@ -410,8 +430,9 @@ export class MpegParser extends AbstractID3Parser {
|
|
|
410
430
|
// Actual calculation will be done in finalize
|
|
411
431
|
this.samplesPerFrame = samples_per_frame;
|
|
412
432
|
this.metadata.setFormat('codecProfile', 'CBR');
|
|
413
|
-
if (this.tokenizer.fileInfo.size)
|
|
433
|
+
if (this.tokenizer.fileInfo.size) {
|
|
414
434
|
return true; // Will calculate duration based on the file size
|
|
435
|
+
}
|
|
415
436
|
}
|
|
416
437
|
else if (this.metadata.format.duration) {
|
|
417
438
|
return true; // We already got the duration, stop processing MPEG stream any further
|
|
@@ -556,8 +577,9 @@ export class MpegParser extends AbstractID3Parser {
|
|
|
556
577
|
return infoTag;
|
|
557
578
|
}
|
|
558
579
|
async skipFrameData(frameDataLeft) {
|
|
559
|
-
if (frameDataLeft < 0)
|
|
580
|
+
if (frameDataLeft < 0) {
|
|
560
581
|
throw new MpegContentError('frame-data-left cannot be negative');
|
|
582
|
+
}
|
|
561
583
|
await this.tokenizer.ignore(frameDataLeft);
|
|
562
584
|
}
|
|
563
585
|
areAllSame(array) {
|
|
@@ -21,7 +21,7 @@ declare const NameCode: {
|
|
|
21
21
|
*/
|
|
22
22
|
audiophile: number;
|
|
23
23
|
};
|
|
24
|
-
type NameCode = typeof NameCode[keyof typeof NameCode];
|
|
24
|
+
type NameCode = (typeof NameCode)[keyof typeof NameCode];
|
|
25
25
|
/**
|
|
26
26
|
* https://github.com/Borewit/music-metadata/wiki/Replay-Gain-Data-Format#originator-code
|
|
27
27
|
*/
|
|
@@ -47,7 +47,7 @@ declare const ReplayGainOriginator: {
|
|
|
47
47
|
*/
|
|
48
48
|
rms_average: number;
|
|
49
49
|
};
|
|
50
|
-
type ReplayGainOriginator = typeof ReplayGainOriginator[keyof typeof ReplayGainOriginator];
|
|
50
|
+
type ReplayGainOriginator = (typeof ReplayGainOriginator)[keyof typeof ReplayGainOriginator];
|
|
51
51
|
/**
|
|
52
52
|
* Replay Gain Data Format
|
|
53
53
|
*
|
|
@@ -56,7 +56,7 @@ export const ReplayGain = {
|
|
|
56
56
|
return {
|
|
57
57
|
type: common.getBitAllignedNumber(buf, off, 0, 3),
|
|
58
58
|
origin: common.getBitAllignedNumber(buf, off, 3, 3),
|
|
59
|
-
adjustment:
|
|
59
|
+
adjustment: sign ? -gain_adj : gain_adj
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
return undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import initDebug from 'debug';
|
|
2
2
|
import * as Token from 'token-types';
|
|
3
3
|
import { AbstractID3Parser } from '../id3v2/AbstractID3Parser.js';
|
|
4
|
-
import { MpcSv8Parser } from './sv8/MpcSv8Parser.js';
|
|
5
|
-
import { MpcSv7Parser } from './sv7/MpcSv7Parser.js';
|
|
6
4
|
import { MusepackContentError } from './MusepackConentError.js';
|
|
5
|
+
import { MpcSv7Parser } from './sv7/MpcSv7Parser.js';
|
|
6
|
+
import { MpcSv8Parser } from './sv8/MpcSv8Parser.js';
|
|
7
7
|
const debug = initDebug('music-metadata:parser:musepack');
|
|
8
8
|
export class MusepackParser extends AbstractID3Parser {
|
|
9
9
|
async postId3v2Parse() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import initDebug from 'debug';
|
|
2
|
-
import { BasicParser } from '../../common/BasicParser.js';
|
|
3
2
|
import { tryParseApeHeader } from '../../apev2/APEv2Parser.js';
|
|
3
|
+
import { BasicParser } from '../../common/BasicParser.js';
|
|
4
|
+
import { MusepackContentError } from '../MusepackConentError.js';
|
|
4
5
|
import { BitReader } from './BitReader.js';
|
|
5
6
|
import * as SV7 from './StreamVersion7.js';
|
|
6
|
-
import { MusepackContentError } from '../MusepackConentError.js';
|
|
7
7
|
const debug = initDebug('music-metadata:parser:musepack');
|
|
8
8
|
export class MpcSv7Parser extends BasicParser {
|
|
9
9
|
constructor() {
|
|
@@ -14,8 +14,9 @@ export class MpcSv7Parser extends BasicParser {
|
|
|
14
14
|
}
|
|
15
15
|
async parse() {
|
|
16
16
|
const header = await this.tokenizer.readToken(SV7.Header);
|
|
17
|
-
if (header.signature !== 'MP+')
|
|
17
|
+
if (header.signature !== 'MP+') {
|
|
18
18
|
throw new MusepackContentError('Unexpected magic number');
|
|
19
|
+
}
|
|
19
20
|
debug(`stream-version=${header.streamMajorVersion}.${header.streamMinorVersion}`);
|
|
20
21
|
this.metadata.setFormat('container', 'Musepack, SV7');
|
|
21
22
|
this.metadata.setFormat('sampleRate', header.sampleFrequency);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { textDecode } from '@borewit/text-codec';
|
|
1
2
|
import * as Token from 'token-types';
|
|
2
3
|
import * as util from '../../common/Util.js';
|
|
3
|
-
import { textDecode } from '@borewit/text-codec';
|
|
4
4
|
/**
|
|
5
5
|
* BASIC STRUCTURE
|
|
6
6
|
*/
|
|
@@ -30,10 +30,10 @@ export const Header = {
|
|
|
30
30
|
albumPeak: Token.UINT16_LE.get(buf, off + 16),
|
|
31
31
|
albumGain: Token.UINT16_LE.get(buf, off + 18),
|
|
32
32
|
// word
|
|
33
|
-
lastFrameLength: (Token.UINT32_LE.get(buf, off + 20) >>> 20) &
|
|
33
|
+
lastFrameLength: (Token.UINT32_LE.get(buf, off + 20) >>> 20) & 0x7ff,
|
|
34
34
|
trueGapless: util.isBitSet(buf, off + 23, 0)
|
|
35
35
|
};
|
|
36
|
-
header.lastFrameLength = header.trueGapless ? (Token.UINT32_LE.get(buf, 20) >>> 20) &
|
|
36
|
+
header.lastFrameLength = header.trueGapless ? (Token.UINT32_LE.get(buf, 20) >>> 20) & 0x7ff : 0;
|
|
37
37
|
return header;
|
|
38
38
|
}
|
|
39
39
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import initDebug from 'debug';
|
|
2
|
-
import { BasicParser } from '../../common/BasicParser.js';
|
|
3
2
|
import { tryParseApeHeader } from '../../apev2/APEv2Parser.js';
|
|
3
|
+
import { BasicParser } from '../../common/BasicParser.js';
|
|
4
4
|
import { FourCcToken } from '../../common/FourCC.js';
|
|
5
|
-
import * as SV8 from './StreamVersion8.js';
|
|
6
5
|
import { MusepackContentError } from '../MusepackConentError.js';
|
|
6
|
+
import * as SV8 from './StreamVersion8.js';
|
|
7
7
|
const debug = initDebug('music-metadata:parser:musepack');
|
|
8
8
|
export class MpcSv8Parser extends BasicParser {
|
|
9
9
|
constructor() {
|
|
@@ -12,8 +12,9 @@ export class MpcSv8Parser extends BasicParser {
|
|
|
12
12
|
}
|
|
13
13
|
async parse() {
|
|
14
14
|
const signature = await this.tokenizer.readToken(FourCcToken);
|
|
15
|
-
if (signature !== 'MPCK')
|
|
15
|
+
if (signature !== 'MPCK') {
|
|
16
16
|
throw new MusepackContentError('Invalid Magic number');
|
|
17
|
+
}
|
|
17
18
|
this.metadata.setFormat('container', 'Musepack, SV8');
|
|
18
19
|
return this.parsePacket();
|
|
19
20
|
}
|
|
@@ -23,7 +24,8 @@ export class MpcSv8Parser extends BasicParser {
|
|
|
23
24
|
const header = await sv8reader.readPacketHeader();
|
|
24
25
|
debug(`packet-header key=${header.key}, payloadLength=${header.payloadLength}`);
|
|
25
26
|
switch (header.key) {
|
|
26
|
-
case 'SH': {
|
|
27
|
+
case 'SH': {
|
|
28
|
+
// Stream Header
|
|
27
29
|
const sh = await sv8reader.readStreamHeader(header.payloadLength);
|
|
28
30
|
this.metadata.setFormat('numberOfSamples', sh.sampleCount);
|
|
29
31
|
this.metadata.setFormat('sampleRate', sh.sampleFrequency);
|
|
@@ -44,7 +46,7 @@ export class MpcSv8Parser extends BasicParser {
|
|
|
44
46
|
break;
|
|
45
47
|
case 'SE': // Stream End
|
|
46
48
|
if (this.metadata.format.duration) {
|
|
47
|
-
this.metadata.setFormat('bitrate', this.audioLength * 8 / this.metadata.format.duration);
|
|
49
|
+
this.metadata.setFormat('bitrate', (this.audioLength * 8) / this.metadata.format.duration);
|
|
48
50
|
}
|
|
49
51
|
return tryParseApeHeader(this.metadata, this.tokenizer, this.options);
|
|
50
52
|
default:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as Token from 'token-types';
|
|
2
1
|
import initDebug from 'debug';
|
|
2
|
+
import * as Token from 'token-types';
|
|
3
3
|
import * as util from '../../common/Util.js';
|
|
4
4
|
const debug = initDebug('music-metadata:parser:musepack:sv8');
|
|
5
5
|
const PacketKey = new Token.StringType(2, 'latin1');
|
|
@@ -75,7 +75,7 @@ export class StreamReader {
|
|
|
75
75
|
if ((n & 0x80) === 0) {
|
|
76
76
|
return { len, value: hb + n };
|
|
77
77
|
}
|
|
78
|
-
n &=
|
|
78
|
+
n &= 0x7f;
|
|
79
79
|
n += hb;
|
|
80
80
|
return this.readVariableSizeField(len + 1, n << 7);
|
|
81
81
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as Token from 'token-types';
|
|
2
|
-
import { EndOfStreamError } from 'strtok3';
|
|
3
1
|
import initDebug from 'debug';
|
|
2
|
+
import { EndOfStreamError } from 'strtok3';
|
|
3
|
+
import * as Token from 'token-types';
|
|
4
4
|
import { BasicParser } from '../common/BasicParser.js';
|
|
5
|
-
import {
|
|
5
|
+
import { makeUnexpectedFileContentError } from '../ParseError.js';
|
|
6
|
+
import { FlacStream } from './flac/FlacStream.js';
|
|
7
|
+
import { PageHeader, SegmentTable } from './OggToken.js';
|
|
6
8
|
import { OpusStream } from './opus/OpusStream.js';
|
|
7
9
|
import { SpeexStream } from './speex/SpeexStream.js';
|
|
8
10
|
import { TheoraStream } from './theora/TheoraStream.js';
|
|
9
|
-
import {
|
|
10
|
-
import { PageHeader, SegmentTable } from './OggToken.js';
|
|
11
|
-
import { FlacStream } from './flac/FlacStream.js';
|
|
11
|
+
import { VorbisStream } from './vorbis/VorbisStream.js';
|
|
12
12
|
export class OggContentError extends makeUnexpectedFileContentError('Ogg') {
|
|
13
13
|
}
|
|
14
14
|
const debug = initDebug('music-metadata:parser:ogg');
|
|
@@ -66,8 +66,9 @@ class OggStream {
|
|
|
66
66
|
if (this.pageConsumer) {
|
|
67
67
|
await this.pageConsumer.parsePage(header, pageData);
|
|
68
68
|
}
|
|
69
|
-
else
|
|
69
|
+
else {
|
|
70
70
|
throw new Error('pageConsumer should be initialized');
|
|
71
|
+
}
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
/**
|
|
@@ -89,30 +90,33 @@ export class OggParser extends BasicParser {
|
|
|
89
90
|
try {
|
|
90
91
|
do {
|
|
91
92
|
header = await this.tokenizer.readToken(PageHeader);
|
|
92
|
-
if (header.capturePattern !== 'OggS')
|
|
93
|
+
if (header.capturePattern !== 'OggS') {
|
|
93
94
|
throw new OggContentError('Invalid Ogg capture pattern');
|
|
95
|
+
}
|
|
94
96
|
let stream = this.streams.get(header.streamSerialNumber);
|
|
95
97
|
if (!stream) {
|
|
96
98
|
stream = new OggStream(this.metadata, header.streamSerialNumber, this.options);
|
|
97
99
|
this.streams.set(header.streamSerialNumber, stream);
|
|
98
100
|
}
|
|
99
101
|
await stream.parsePage(this.tokenizer, header);
|
|
100
|
-
if (stream.pageNumber > 12 &&
|
|
101
|
-
|
|
102
|
+
if (stream.pageNumber > 12 &&
|
|
103
|
+
!(this.options.duration && [...this.streams.values()].find(stream => stream.pageConsumer?.durationOnLastPage))) {
|
|
104
|
+
debug('Stop processing Ogg stream');
|
|
102
105
|
break;
|
|
103
106
|
}
|
|
104
107
|
} while (![...this.streams.values()].every(item => item.closed));
|
|
105
108
|
}
|
|
106
109
|
catch (err) {
|
|
107
110
|
if (err instanceof EndOfStreamError) {
|
|
108
|
-
debug(
|
|
111
|
+
debug('Reached end-of-stream');
|
|
109
112
|
enfOfStream = true;
|
|
110
113
|
}
|
|
111
114
|
else if (err instanceof OggContentError) {
|
|
112
115
|
this.metadata.addWarning(`Corrupt Ogg content at ${this.tokenizer.position}`);
|
|
113
116
|
}
|
|
114
|
-
else
|
|
117
|
+
else {
|
|
115
118
|
throw err;
|
|
119
|
+
}
|
|
116
120
|
}
|
|
117
121
|
for (const stream of this.streams.values()) {
|
|
118
122
|
if (!stream.closed) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ITokenizer } from 'strtok3';
|
|
2
|
-
import type * as Ogg from '../OggToken.js';
|
|
3
|
-
import type { IOptions } from '../../type.js';
|
|
4
2
|
import type { INativeMetadataCollector } from '../../common/MetadataCollector.js';
|
|
3
|
+
import type { IOptions } from '../../type.js';
|
|
4
|
+
import type * as Ogg from '../OggToken.js';
|
|
5
5
|
/**
|
|
6
6
|
* Ref:
|
|
7
7
|
* - https://xiph.org/flac/ogg_mapping.html
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import initDebug from 'debug';
|
|
2
|
-
import * as Flac from '../../flac/FlacToken.js';
|
|
3
|
-
import { FlacParser } from '../../flac/FlacParser.js';
|
|
4
2
|
import { FourCcToken } from '../../common/FourCC.js';
|
|
3
|
+
import { FlacParser } from '../../flac/FlacParser.js';
|
|
4
|
+
import * as Flac from '../../flac/FlacToken.js';
|
|
5
5
|
import { VorbisPictureToken } from '../vorbis/Vorbis.js';
|
|
6
6
|
const debug = initDebug('music-metadata:parser:ogg:theora');
|
|
7
7
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ITokenizer } from 'strtok3';
|
|
2
|
+
import type { INativeMetadataCollector } from '../../common/MetadataCollector.js';
|
|
3
|
+
import type { IOptions } from '../../type.js';
|
|
2
4
|
import type { IPageHeader } from '../OggToken.js';
|
|
3
5
|
import { VorbisStream } from '../vorbis/VorbisStream.js';
|
|
4
|
-
import type { IOptions } from '../../type.js';
|
|
5
|
-
import type { INativeMetadataCollector } from '../../common/MetadataCollector.js';
|
|
6
6
|
/**
|
|
7
7
|
* Opus parser
|
|
8
8
|
* Internet Engineering Task Force (IETF) - RFC 6716
|
|
@@ -24,8 +24,9 @@ export class OpusStream extends VorbisStream {
|
|
|
24
24
|
this.metadata.setFormat('codec', 'Opus');
|
|
25
25
|
// Parse Opus ID Header
|
|
26
26
|
this.idHeader = new Opus.IdHeader(pageData.length).get(pageData, 0);
|
|
27
|
-
if (this.idHeader.magicSignature !==
|
|
28
|
-
throw new OpusContentError(
|
|
27
|
+
if (this.idHeader.magicSignature !== 'OpusHead') {
|
|
28
|
+
throw new OpusContentError('Illegal ogg/Opus magic-signature');
|
|
29
|
+
}
|
|
29
30
|
this.metadata.setFormat('sampleRate', this.idHeader.inputSampleRate);
|
|
30
31
|
this.metadata.setFormat('numberOfChannels', this.idHeader.channelCount);
|
|
31
32
|
this.metadata.setAudioOnly();
|
|
@@ -42,14 +43,17 @@ export class OpusStream extends VorbisStream {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
calculateDuration(enfOfStream) {
|
|
45
|
-
if (this.lastPageHeader &&
|
|
46
|
+
if (this.lastPageHeader &&
|
|
47
|
+
(enfOfStream || this.lastPageHeader.headerType.lastPage) &&
|
|
48
|
+
this.metadata.format.sampleRate &&
|
|
49
|
+
this.lastPageHeader.absoluteGranulePosition >= 0) {
|
|
46
50
|
// Calculate duration
|
|
47
51
|
const pos_48bit = this.lastPageHeader.absoluteGranulePosition - this.idHeader.preSkip;
|
|
48
52
|
this.metadata.setFormat('numberOfSamples', pos_48bit);
|
|
49
53
|
this.metadata.setFormat('duration', pos_48bit / 48000);
|
|
50
54
|
if (this.lastPos !== -1 && this.tokenizer.fileInfo.size && this.metadata.format.duration) {
|
|
51
55
|
const dataSize = this.tokenizer.fileInfo.size - this.lastPos;
|
|
52
|
-
this.metadata.setFormat('bitrate', 8 * dataSize / this.metadata.format.duration);
|
|
56
|
+
this.metadata.setFormat('bitrate', (8 * dataSize) / this.metadata.format.duration);
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ITokenizer } from 'strtok3';
|
|
2
|
+
import type { INativeMetadataCollector } from '../../common/MetadataCollector.js';
|
|
3
|
+
import type { IOptions } from '../../type.js';
|
|
2
4
|
import type { IPageHeader } from '../OggToken.js';
|
|
3
5
|
import { VorbisStream } from '../vorbis/VorbisStream.js';
|
|
4
|
-
import type { IOptions } from '../../type.js';
|
|
5
|
-
import type { INativeMetadataCollector } from '../../common/MetadataCollector.js';
|
|
6
6
|
/**
|
|
7
7
|
* Speex, RFC 5574
|
|
8
8
|
* Ref:
|
|
@@ -35,8 +35,9 @@ export class SpeexStream extends VorbisStream {
|
|
|
35
35
|
* Ref: https://tools.ietf.org/html/rfc5574#section-3
|
|
36
36
|
*/
|
|
37
37
|
async parseFullPage(pageData) {
|
|
38
|
-
if (this.commentHeaderParsed)
|
|
38
|
+
if (this.commentHeaderParsed) {
|
|
39
39
|
return;
|
|
40
|
+
}
|
|
40
41
|
this.commentHeaderParsed = true;
|
|
41
42
|
debug('Parse Ogg/Speex comment header');
|
|
42
43
|
await this.parseUserCommentList(pageData, 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ITokenizer } from 'strtok3';
|
|
2
|
-
import type * as Ogg from '../OggToken.js';
|
|
3
|
-
import type { IOptions } from '../../type.js';
|
|
4
2
|
import type { INativeMetadataCollector } from '../../common/MetadataCollector.js';
|
|
3
|
+
import type { IOptions } from '../../type.js';
|
|
4
|
+
import type * as Ogg from '../OggToken.js';
|
|
5
5
|
/**
|
|
6
6
|
* Ref:
|
|
7
7
|
* - https://theora.org/doc/Theora.pdf
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IPicture } from '../../type.js';
|
|
2
1
|
import type { IGetToken } from 'strtok3';
|
|
2
|
+
import type { IPicture } from '../../type.js';
|
|
3
3
|
/**
|
|
4
4
|
* Interface to parsed result of METADATA_BLOCK_PICTURE
|
|
5
5
|
* Ref: https://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type IVorbisPicture } from './Vorbis.js';
|
|
2
|
-
import type { IPageConsumer, IPageHeader } from '../OggToken.js';
|
|
3
|
-
import type { IOptions } from '../../type.js';
|
|
4
1
|
import type { INativeMetadataCollector } from '../../common/MetadataCollector.js';
|
|
2
|
+
import type { IOptions } from '../../type.js';
|
|
3
|
+
import type { IPageConsumer, IPageHeader } from '../OggToken.js';
|
|
4
|
+
import { type IVorbisPicture } from './Vorbis.js';
|
|
5
5
|
declare const VorbisContentError_base: {
|
|
6
6
|
new (message: string): {
|
|
7
7
|
readonly fileType: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as Token from 'token-types';
|
|
2
1
|
import debugInit from 'debug';
|
|
3
|
-
import
|
|
4
|
-
import { CommonHeader, IdentificationHeader, VorbisPictureToken } from './Vorbis.js';
|
|
2
|
+
import * as Token from 'token-types';
|
|
5
3
|
import { makeUnexpectedFileContentError } from '../../ParseError.js';
|
|
4
|
+
import { CommonHeader, IdentificationHeader, VorbisPictureToken } from './Vorbis.js';
|
|
5
|
+
import { VorbisDecoder } from './VorbisDecoder.js';
|
|
6
6
|
const debug = debugInit('music-metadata:parser:ogg:vorbis1');
|
|
7
7
|
export class VorbisContentError extends makeUnexpectedFileContentError('Vorbis') {
|
|
8
8
|
}
|
|
@@ -64,9 +64,9 @@ export class VorbisStream {
|
|
|
64
64
|
return tag.len;
|
|
65
65
|
}
|
|
66
66
|
async addTag(id, value) {
|
|
67
|
-
if (id === 'METADATA_BLOCK_PICTURE' &&
|
|
67
|
+
if (id === 'METADATA_BLOCK_PICTURE' && typeof value === 'string') {
|
|
68
68
|
if (this.options.skipCovers) {
|
|
69
|
-
debug(
|
|
69
|
+
debug('Ignore picture');
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
value = VorbisPictureToken.fromBase64(value);
|
|
@@ -78,7 +78,10 @@ export class VorbisStream {
|
|
|
78
78
|
await this.metadata.addTag('vorbis', id, value);
|
|
79
79
|
}
|
|
80
80
|
calculateDuration(enfOfStream) {
|
|
81
|
-
if (this.lastPageHeader &&
|
|
81
|
+
if (this.lastPageHeader &&
|
|
82
|
+
(enfOfStream || this.lastPageHeader.headerType.lastPage) &&
|
|
83
|
+
this.metadata.format.sampleRate &&
|
|
84
|
+
this.lastPageHeader.absoluteGranulePosition >= 0) {
|
|
82
85
|
// Calculate duration
|
|
83
86
|
this.metadata.setFormat('numberOfSamples', this.lastPageHeader.absoluteGranulePosition);
|
|
84
87
|
this.metadata.setFormat('duration', this.lastPageHeader.absoluteGranulePosition / this.metadata.format.sampleRate);
|
|
@@ -95,8 +98,9 @@ export class VorbisStream {
|
|
|
95
98
|
debug('Parse first page');
|
|
96
99
|
// Parse Vorbis common header
|
|
97
100
|
const commonHeader = CommonHeader.get(pageData, 0);
|
|
98
|
-
if (commonHeader.vorbis !== 'vorbis')
|
|
101
|
+
if (commonHeader.vorbis !== 'vorbis') {
|
|
99
102
|
throw new VorbisContentError('Metadata does not look like Vorbis');
|
|
103
|
+
}
|
|
100
104
|
if (commonHeader.packetType === 1) {
|
|
101
105
|
const idHeader = IdentificationHeader.get(pageData, CommonHeader.len);
|
|
102
106
|
this.metadata.setFormat('sampleRate', idHeader.sampleRate);
|
|
@@ -104,8 +108,9 @@ export class VorbisStream {
|
|
|
104
108
|
this.metadata.setFormat('numberOfChannels', idHeader.channelMode);
|
|
105
109
|
debug('sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s', idHeader.sampleRate, idHeader.bitrateNominal, idHeader.channelMode);
|
|
106
110
|
}
|
|
107
|
-
else
|
|
111
|
+
else {
|
|
108
112
|
throw new VorbisContentError('First Ogg page should be type 1: the identification header');
|
|
113
|
+
}
|
|
109
114
|
}
|
|
110
115
|
async parseFullPage(pageData) {
|
|
111
116
|
// New page
|
|
@@ -130,7 +135,7 @@ export class VorbisStream {
|
|
|
130
135
|
let userCommentListLength = Token.UINT32_LE.get(pageData, offset);
|
|
131
136
|
offset += 4;
|
|
132
137
|
while (userCommentListLength-- > 0) {
|
|
133
|
-
offset +=
|
|
138
|
+
offset += await this.parseUserComment(pageData, offset);
|
|
134
139
|
}
|
|
135
140
|
}
|
|
136
141
|
}
|
|
@@ -18,12 +18,14 @@ const vorbisTagMap = {
|
|
|
18
18
|
ORIGINALYEAR: 'originalyear',
|
|
19
19
|
RELEASEDATE: 'releasedate',
|
|
20
20
|
COMMENT: 'comment',
|
|
21
|
+
DESCRIPTION: 'comment',
|
|
21
22
|
TRACKNUMBER: 'track',
|
|
22
23
|
DISCNUMBER: 'disk',
|
|
23
24
|
GENRE: 'genre',
|
|
24
25
|
METADATA_BLOCK_PICTURE: 'picture',
|
|
25
26
|
COMPOSER: 'composer',
|
|
26
27
|
LYRICS: 'lyrics',
|
|
28
|
+
UNSYNCEDLYRICS: 'lyrics',
|
|
27
29
|
ALBUMSORT: 'albumsort',
|
|
28
30
|
TITLESORT: 'titlesort',
|
|
29
31
|
WORK: 'work',
|
|
@@ -41,6 +43,8 @@ const vorbisTagMap = {
|
|
|
41
43
|
DJMIXER: 'djmixer',
|
|
42
44
|
MIXER: 'mixer',
|
|
43
45
|
LABEL: 'label',
|
|
46
|
+
ORGANIZATION: 'label',
|
|
47
|
+
PUBLISHER: 'label',
|
|
44
48
|
GROUPING: 'grouping',
|
|
45
49
|
SUBTITLE: 'subtitle',
|
|
46
50
|
DISCSUBTITLE: 'discsubtitle',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SupportedEncoding } from '@borewit/text-codec';
|
|
1
2
|
import type { IGetToken } from 'strtok3';
|
|
2
3
|
import type { IChunkHeader } from '../iff/index.js';
|
|
3
4
|
export type { IChunkHeader } from '../iff/index.js';
|
|
@@ -9,8 +10,9 @@ export declare const Header: IGetToken<IChunkHeader>;
|
|
|
9
10
|
* Token to parse RIFF-INFO tag value
|
|
10
11
|
*/
|
|
11
12
|
export declare class ListInfoTagValue implements IGetToken<string> {
|
|
13
|
+
private readonly encoding;
|
|
12
14
|
len: number;
|
|
13
15
|
private tagHeader;
|
|
14
|
-
constructor(tagHeader: IChunkHeader);
|
|
16
|
+
constructor(tagHeader: IChunkHeader, encoding?: SupportedEncoding);
|
|
15
17
|
get(buf: Uint8Array, off: number): string;
|
|
16
18
|
}
|