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.
About the PR
Adds the use of audio mixers for in-game audio. Read the details about mixers in the PR to Robust Toolbox.
There are the proposed mixers (
Resources/Prototypes/audio_mixers.yml
):Music
[No volume slider] (let me know if slider is really needed)Ambience
AmbienceMusic
LobbyMusic
Interface
WorldSounds
WorldOtherSounds
[Default]Midi
Jukebox
The child mixers volume sliders are visually indented (see media)
Why / Balance
Technical details
Requires space-wizards/RobustToolbox#5554
We should probably start assigning more specific mixers to the different sounds (for example separate mixer for weapon sounds) after this PR, this can be done by passing mixer id to AudioParams.
Important: Entity-based mixers from prototypes problem
This also is mostly copy-pasted from corresponding part in the PR to Robust Toolbox, so you will not find anything new if you read that one.
TL;DR: Either one integration test should be adjusted/ignored, or I need help to come up with a different way to handle entity-based mixers from prototypes.
The concept of "prototyped" mixers conflicts with entity-based mixers in terms of lifetimes.
My first implementation of this was lazily creating mixers for prototype when requested, newly created mixer then stored in dictionary indefinitely. Unfortunately, some SS14 integration tests does not like this idea when any entity creates more other entities than deletes after got deleted.
This implementation creates all mixer entities from prototypes at start of the simulation (check out the funny way how system knows when its time to spawn entities) and when entities flushed. Set of such entities exists separately on client and server though because single-player games may exist and (probably) entities from server may not be sent to the client fast enough. The problem with this implementation is that other SS14 integration test (DeleteAllThenGhost this time) can't handle that deleting all entities on the server leaves mixer entities on client.
So this problem is relevant and PR probably should not be merged like this, either mixers should be implemented differently (but I don't know how at this point) or SS14 integration tests should be adjusted.
Media
Requirements
Breaking changes
None (I hope)
Changelog
🆑