yaml AudioParams are often ignored #34318
Labels
DB: Beginner Friendly
Difficulty: Great for beginners. Unambiguous in scope, and explains how to achieve the result.
P3: Standard
Priority: Default priority for repository items.
S: Help Wanted
Status: Requesting additional help for this to be completed.
T: Cleanup
Type: Code clean-up, without being a full refactor or feature
In many cases, systems that play sound ignore the audio options associated with a
SoundSpecifier
. I.e., they don't use theSoundSpecifier.Params
field. Instead they often just bulldoze it with the default options. This should be fixed, so that sound options can be consistently specified in yaml.E.g., stuff like
needs to be replaced with something like
Here are some the common mistakes/issues that need to be fixed:
AudioParams.WithVolume()
should probably be replaced withAudioParams.AddVolume()
AudioHelpers.WithVariation()
needs to be removed.AudioParams.Variation
field that should be set. Though again, in many cases that should be set in yaml not in C#, as that just bulldozes the yaml value.AddVariation()
method, akin toAddVolume()
?AudioParams.Default
is used.AudioSystem.GetSound()
SoundSpecifier.Params
was added and need to be updated.PlaySound
construction action has its ownAudioParams
instead of just using theSoundSpecifier
's.The text was updated successfully, but these errors were encountered: