Fix audio volume rolloff and some missing/incorrect sounds#1282
Open
TorutheRedFox wants to merge 1 commit intosmartcmd:mainfrom
Open
Fix audio volume rolloff and some missing/incorrect sounds#1282TorutheRedFox wants to merge 1 commit intosmartcmd:mainfrom
TorutheRedFox wants to merge 1 commit intosmartcmd:mainfrom
Conversation
Author
|
Demonstration of fixed audio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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