Sound Reloader
你是否曾不小心拔掉耳机,导致 Minecraft 没有重新加载音频?这是否让你非常恼火,因为它本就应该默认自动完成?
好吧,我正好有一个模组适合你!
Sound Reloader 确保当你重新插入音箱或耳机时,音频会自动恢复!
甚至还有一个小小的弹出提示。(哇!!)(你甚至可以在音乐和音效菜单中关闭这个弹出提示,太棒了!!)

注意
有可能无法检测到你的音频设备重新连接。重新插拔设备_应该_能解决这个问题。
工作原理
Sound Reloader 使用两种检测路径来感知音频输出的变化。
首先,它每秒通过 ALC_EXT_disconnect 扩展检查 OpenAL,查看当前设备是否已断开并重新连接。
其次,一个后台线程每 2 秒轮询 Java 的 AudioSystem,以查找新的输出混音器(例如,当你插入耳机或 USB DAC 时)。
当任一路径检测到变化时,它会等待 3 秒让设备稳定,然后调用 Minecraft 的 SoundManager.reloadSounds() 来重新初始化声音引擎。
已在 1.21.1 和 1.21.11 上测试。需要 Fabric API。
Sound Reloader
Ever accidentally unplugged your headphones and Minecraft just didn't reload the audio? Does that annoy the shit out of you because it should just do it by default?
Well I've got just the mod for you!
Sound Reloader makes sure your audio comes back AUTOMATICALLY whenever you plug your speakers or headphones back in!
There's even a litte popup when it does it. (WOW!!) (you can even turn off the popup in the Music & Sound menu WOWWOW!!)

Note
There's a chance it wont detect when your audio device is reconnected. Replugging your device back in should fix it.
How it works
Sound Reloader uses two detection paths to notice when your audio output changes.
First, it checks OpenAL every second via the ALC_EXT_disconnect extension to see if the current device has disconnected and then reconnected.
Second, a background thread polls Java’s AudioSystem every 2 seconds for new output mixers (e.g., when you plug in headphones or a USB DAC).
When either path detects a change, it waits 3 seconds for the device to stabilize, then calls Minecraft’s SoundManager.reloadSounds() to reinitialize the sound engine.
Tested on 1.21.1 and 1.21.11. Requires Fabric API.
评论 0
登录后参与评分
还没有评论,来抢沙发吧