Skip to content

Commit 2376733

Browse files
committed
feat: add support for MPEG ADTS
i didnt even know this was a thing till vaneer pointed it out lmao
1 parent ad52282 commit 2376733

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/file_format.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ use std::{io::{BufReader, Read, Seek}, fs::File};
22
use encore::FileFormat;
33

44
static FILE_HEADERS: &[(&[u8], FileFormat, u64)] = &[
5-
( b"OggS", FileFormat::Audio, 0 ), // .ogg
6-
( b"ID3", FileFormat::Audio, 0 ), // .mp3
7-
( b"fLaC", FileFormat::Audio, 0 ), // .flac
8-
( b"RIFF", FileFormat::Audio, 0 ), // .wav
5+
( b"OggS", FileFormat::Audio, 0 ), // .ogg
6+
( b"ID3", FileFormat::Audio, 0 ), // .mp3
7+
( b"\xfb\x90\x04", FileFormat::Audio, 1 ), // .mp3 (MPEG ADTS)
8+
( b"fLaC", FileFormat::Audio, 0 ), // .flac
9+
( b"RIFF", FileFormat::Audio, 0 ), // .wav
910
];
1011

1112
/// because `file-format` is bloated

0 commit comments

Comments
 (0)