daipenger / Sound-Physics

A Minecraft mod that provides realistic sound attenuation, reverberation, and absorption through blocks.
GNU General Public License v3.0
52 stars 8 forks source link

1.7.10 Support #9

Open JAD3N opened 7 years ago

JAD3N commented 7 years ago

I think it might be a good idea to consider supporting a vast majority of versions including 1.7.10 and perhaps have them on separate branches?

daipenger commented 7 years ago

1.7.10, maybe. All other versions prior to 1.7.10: No, too old. All other versions after 1.7.10: No, only a subset of 1.12. People have to move on.

Wait until I have found the cause of the bug with stereo sound files, though.

JAD3N commented 7 years ago

Wasn't the issue that the original files are mono?

daipenger commented 7 years ago

No, the other way around. See #8 for that.

I currently do not see anything that goes wrong in the code. All filters are set up how they should be. But I also do not understand EFX in detail and cannot properly debug it. There is this huge http://kcat.strangesoft.net/misc-downloads/Effects%20Extension%20Guide.pdf documentation about EFX, but I do not have the time to read that. I guess I will have to deactivate filter after filter and try to narrow down the cause.

JAD3N commented 7 years ago

Have you got a sample resource pack I can use to debug also?

daipenger commented 7 years ago

Just use the default ressource pack. Set up a dispenser and let it dispense nothing. (Sound name: minecraft:block.dispenser.fail) That's one of default stereo sounds.

My current debugging is a bit strange: I disabled the modified soundDistanceAllowance and stuff like global volume multiplier. You can definitely hear that sound cuts off with the default distance. The mod also does not seem to directly affect volume: All filters work properly and only muffle sound due to raytracing results. There is something going wrong in SoundManager.playSound with determining the sound volume. However, the master volume setting of the game still works (which is done at the same spot)!

EDIT: Disabling the patching of atteniationModel and globalRolloffFactor in SoundSystem.newSource is the culprit! Found some documentation in SoundSystemConfig: /**

Yeah... Seems like we have to go back to linear rolloff. That is obviously the minecraft default and known to work.

JAD3N commented 7 years ago

I'm going to start work on the 1.7.10 branch.

daipenger commented 7 years ago

Alright, you might want to branch off with my latest commits :) That pesky bug is now fixed