Fix audio volume rolloff and some missing/incorrect sounds#1282
Fix audio volume rolloff and some missing/incorrect sounds#1282TorutheRedFox wants to merge 3 commits intoMCLCE:mainfrom
Conversation
|
Demonstration of fixed audio |
|
How can I implement this? |
merge the commit into your fork |
|
@TorutheRedFox how do i do that? |
|
seems sane, will test |
Minecraft.Client_3NAIBfcveN.mp4any reason why it plays the title sounds a bit messed up? |
|
wdym by messed up? |
its playing twice i think lol |
|
i haven't changed anything except add a fallback path for ui audio and change parameters for audio rolloff the difference could just be perceptual as the ui audio is lower in volume |
|
The UI sounds are definitely being played back in a way that makes them sound doubled instead of stacked. If there's an underlying bug thats causing that (which this PR only makes noticeable) then it'll still need to be fixed before it's merged |
Description
Fixes issues with sound volume, incorrect explosion sound playing and portal sounds not playing at all.
Changes
Previous Behavior
People complained of sounds being too quiet or not playing at all
Root Cause
Sound rolloff was set up incorrectly by using the wrong algorithm (miniaudio's default isn't linear while Minecraft expects linear), and in the case of jukeboxes, the 3d parameters weren't set up at all.
New Behavior
Sound volumes have been corrected by trying to match early Java Edition's use of Paul Lamb's SoundSystem and the correct explosion sounds now play. All portal sounds now play as they should too.
Fix Implementation
The correct algorithm is explicitly specified when playing sounds using miniaudio, and 3D audio parameters were tweaked to ensure the correct rolloff and volumes (rolloff increased to 1.0 from 0,5, max volume reduced to 1.0 from 1.5 as compensation is no longer necessary, etc.). Explosion sounds were fixed by removing explode.ogg and portal sounds were fixed by making SoundEngine::PlayUI also search the base sound folder (Windows64Media\Sound\Minecraft) if it can't find the requested sound in the UI subfolder. The volume of PlayUI was also corrected according to Java Edition's behavior (multiply the volume by 0.25 after clamping it), making the portal sounds that use it not ear-piercingly loud.
Notes
Chest sounds are still quiet, though that was an intentional change on 4J's part because someone deemed it to be "much louder than other sounds".
AI Use Disclosure
No AI has been used to make this PR.
Related Issues