Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

游戏没声音了 #5892

Closed
1 task done
ZhuangXHAD opened this issue Mar 20, 2025 · 16 comments
Closed
1 task done

游戏没声音了 #5892

ZhuangXHAD opened this issue Mar 20, 2025 · 16 comments
Labels
· Bug 完成 已被处理,将在下次更新之后生效 🟪 极高 优先度:极高

Comments

@ZhuangXHAD
Copy link

检查项

描述

我更新pcl之后启动游戏游戏会比以前启动的更慢,启动成功之后材质包没有自动使用而且没有声音。

重现步骤

1、点击xxxx
2、往下滚,然后点击xxxx

日志与附件

Log1.txt
Log2.txt
Log3.txt
Log4.txt
Log5.txt

@ZhuangXHAD ZhuangXHAD added · Bug 新提交 需要社区初步确认其有效的新提交 labels Mar 20, 2025
@shimoranla

This comment has been minimized.

@shimoranla shimoranla added 等待提交者 需要提交者补充信息或进行操作 and removed 新提交 需要社区初步确认其有效的新提交 labels Mar 20, 2025
@ZhuangXHAD

This comment has been minimized.

@shimoranla

This comment has been minimized.

@ZhuangXHAD

This comment has been minimized.

@Open-KFC

This comment has been minimized.

@ZhuangXHAD
Copy link
Author

发一下游戏日志

2025-03-20-1.log.gz
2025-03-20-2.log.gz
2025-03-20-3.log.gz

@shimoranla
Copy link
Collaborator

shimoranla commented Mar 21, 2025

这个是 OpenAL 的 Bug,没法修

[21:49:40] [Client thread/INFO]: Setting user: ZhuangXHAD
[21:49:44] [Client thread/INFO]: LWJGL Version: 2.9.4
[21:49:55] [Client thread/INFO]: Reloading ResourceManager: Essential Assets, Essential (forge_1.8.9).processed.jar, Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Essential, FMLFileResourcePack:OneConfig, FMLFileResourcePack:Hypixel Mod API, FMLFileResourcePack:ChatTriggers, FMLFileResourcePack:Dulkir Mod, FMLFileResourcePack:Dungeon Rooms Mod, FMLFileResourcePack:Fancy Warp Menu, FMLFileResourcePack:NotEnoughUpdates, FMLFileResourcePack:OdinClient, FMLFileResourcePack:Patcher, FMLFileResourcePack:Scrollable Tooltips, FMLFileResourcePack:SkyblockAddons, FMLFileResourcePack:SkyblockExtras, FMLFileResourcePack:SkyHanni, FMLFileResourcePack:Skytils, FMLFileResourcePack:SomeWaterSolver, NEU Repo Resources, !   §fsnow§9fault §f[16x](1).zip
[21:50:09] [Sound Library Loader/INFO]: Starting up SoundSystem...
[21:50:09] [Thread-103/INFO]: Initializing LWJGL OpenAL
[21:50:09] [Thread-103/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[21:50:09] [Thread-103/ERROR]: Error in class 'LibraryLWJGLOpenAL'
[21:50:09] [Thread-103/ERROR]: Unable to initialize OpenAL.  Probable cause: OpenAL not supported.
[21:50:09] [Thread-103/WARN]: ERROR MESSAGE:
[21:50:09] [Thread-103/INFO]: Could not locate OpenAL library.
[21:50:09] [Thread-103/WARN]: STACK TRACE:
[21:50:09] [Thread-103/INFO]: org.lwjgl.openal.AL.create(AL.java:156)
[21:50:09] [Thread-103/INFO]: org.lwjgl.openal.AL.create(AL.java:102)
[21:50:09] [Thread-103/INFO]: org.lwjgl.openal.AL.create(AL.java:206)
[21:50:09] [Thread-103/INFO]: paulscode.sound.libraries.LibraryLWJGLOpenAL.init(LibraryLWJGLOpenAL.java:164)
[21:50:09] [Thread-103/INFO]: paulscode.sound.SoundSystem.CommandNewLibrary(SoundSystem.java:1576)
[21:50:09] [Thread-103/INFO]: paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2572)
[21:50:09] [Thread-103/INFO]: paulscode.sound.CommandThread.run(CommandThread.java:121)
[21:50:09] [Sound Library Loader/WARN]: ERROR MESSAGE:
[21:50:09] [Sound Library Loader/INFO]: Could not locate OpenAL library.
[21:50:09] [Sound Library Loader/INFO]: Starting up SoundSystem...
[21:50:10] [Thread-105/INFO]: Switching to No Sound
[21:50:10] [Thread-105/INFO]: (Silent Mode)

@shimoranla shimoranla added 重复 与已有的反馈或讨论重复 and removed 等待提交者 需要提交者补充信息或进行操作 labels Mar 21, 2025
@zkitefly
Copy link
Collaborator

zkitefly commented Mar 22, 2025

HMCL-dev/HMCL#1754 可知,硬设置 -Dfile.encoding=UTF-8 可能会出现 1.12.2 及以下版本出现无声音问题

LWJGL2 加载本机库时内部使用 String::getBytes() 解码路径,所以依赖于默认编码,将 file.encoding 设置为 UTF-8 破坏了本机库加载,导致没有声音。

我认为这个应该重新审查该 Issue

@zkitefly zkitefly reopened this Mar 22, 2025
@zkitefly zkitefly added 等待提交者 需要提交者补充信息或进行操作 and removed 重复 与已有的反馈或讨论重复 labels Mar 22, 2025
@zkitefly
Copy link
Collaborator

劳烦 Author 能找到 PCL 目录的 启动脚本,右键编辑,然后将 -Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 + 一个空格 删除,保存退出,然后双击该脚本启动游戏,看看游戏是否有声音

@Pigeon0v0
Copy link
Collaborator

获取系统编码并设置可不可行?

@ZhuangXHAD
Copy link
Author

劳烦 Author 能找到 PCL 目录的 启动脚本,右键编辑,然后将 -Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 + 一个空格 删除,保存退出,然后双击该脚本启动游戏,看看游戏是否有声音

我用高版本的openal然后把文件目录里面的中文全部改成英文之后就有声音了,谢谢

@allMagicNB
Copy link
Contributor

allMagicNB commented Mar 22, 2025

💥

@wyc-26
Copy link
Contributor

wyc-26 commented Mar 23, 2025

这个应该如何解决……
感觉 1.12.2 及以下禁用 -Dfile.encoding=UTF-8 并不是一种好方案

@shimoranla shimoranla added 等待确认 已经过社区确认,等待开发者确认 and removed 等待提交者 需要提交者补充信息或进行操作 labels Apr 1, 2025
@shimoranla
Copy link
Collaborator

这个 Bug 的修复方式应该是根据系统编码进行设置

@LTCatt LTCatt added 处理中 开发者正在调查或处理该项 🟪 极高 优先度:极高 and removed 等待确认 已经过社区确认,等待开发者确认 labels Apr 2, 2025
@allMagicNB
Copy link
Contributor

?等会不对啊,我不是有做判断吗?

@allMagicNB
Copy link
Contributor

找到原因了,不知道谁直接把参数加到默认 JVM 参数中了,导致被硬编码了。😅

@LTCatt LTCatt closed this as completed Apr 2, 2025
@HexDragon-Bot HexDragon-Bot added 完成 已被处理,将在下次更新之后生效 and removed 处理中 开发者正在调查或处理该项 labels Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
· Bug 完成 已被处理,将在下次更新之后生效 🟪 极高 优先度:极高
Projects
None yet
Development

No branches or pull requests

9 participants