Sounds are broken
JosephFrankFir opened this issue ยท 11 comments
Describe the bug
When too many machines work at the same time, the sounds break, making the game unplayable.
Attachment
2024-04-16.14-04-43.1.mp4
Version
HBM-NTM-.1.0.27_X4921
it's working well so far and the code for it is
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import paulscode.sound.SoundSystemConfig;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
SoundSystemConfig.setNumberNormalChannels(1024);
SoundSystemConfig.setNumberStreamingChannels(32);
}
Minecraft has a limit on how many sounds can play at once, after which it will simply forcefully stop older sounds. looped sounds will restart themselves if they are stopped, which is why they will then constantly start and stop due to hitting the limit. I don't think there's anything I can do about that, since I can't find where in the code that limit is imposed or how to avoid it.
I guess the only way is to hardcode OpenAL library and potentially Minecraft's internal architecture but it's complex i think
At the latest on sunday, although with the current issues of the new power grid, probably sooner.