From 16e33989c80cf3f6d6c83dffe320402760dd1def Mon Sep 17 00:00:00 2001 From: Color_yr <402067010@qq.com> Date: Sat, 19 Sep 2026 18:36:36 +0800 Subject: [PATCH] =?UTF-8?q?mp3=E6=8E=A2=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 +- .../coloryr/allmusic/client/core/AllMusicPlayer.java | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 546b1714..53800dd0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 diff --git a/client/src/main/java/com/coloryr/allmusic/client/core/AllMusicPlayer.java b/client/src/main/java/com/coloryr/allmusic/client/core/AllMusicPlayer.java index 511b8825..1b2ff0d0 100644 --- a/client/src/main/java/com/coloryr/allmusic/client/core/AllMusicPlayer.java +++ b/client/src/main/java/com/coloryr/allmusic/client/core/AllMusicPlayer.java @@ -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);