mp3探测

This commit is contained in:
Color_yr committed 2026-09-19 18:36:36 +08:00
1 parent 910c569ba7
commit 16e33989c8
2 files changed
+8 -4

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ allprojects {
apply(plugin = "com.gradleup.shadow")
group = "com.coloryr"
version = "4.2.3"
version = "4.2.4"
// 设置项目JDK版本
java.sourceCompatibility = JavaVersion.VERSION_1_8
@@ -197,9 +197,13 @@ public class AllMusicPlayer extends InputStream {
if (head[0] == 0 && head[1] == 0 && head[2] == 0 && head[3] == 0x1c) {
decoder = new M4ADecoder(this);
} else if (head[0] == 'I' && head[1] == 'D' && head[2] == '3') {
decoder = new Mp3Decoder(this);
} else if (head[0] == (byte) 0xFF && head[1] == (byte) 0xFB) {
} else if ((head[0] == 'I' && head[1] == 'D' && head[2] == '3')
|| (head[0] == (byte) 0xFF && head[1] == (byte) 0xFB)
|| (head[0] == (byte) 0xFF && head[1] == (byte) 0xFA)
|| (head[0] == (byte) 0xFF && head[1] == (byte) 0xF3)
|| (head[0] == (byte) 0xFF && head[1] == (byte) 0xF2)
|| (head[0] == (byte) 0xFF && head[1] == (byte) 0xE3)
|| (head[0] == (byte) 0xFF && head[1] == (byte) 0xE2)) {
decoder = new Mp3Decoder(this);
} else {
decoder = new OggDecoder(this);