Skip to content

Add mute toggle to AudioStreamPlayers#120871

Open
Akosmo wants to merge 1 commit into
godotengine:masterfrom
Akosmo:mute-players
Open

Add mute toggle to AudioStreamPlayers#120871
Akosmo wants to merge 1 commit into
godotengine:masterfrom
Akosmo:mute-players

Conversation

@Akosmo

@Akosmo Akosmo commented Jul 2, 2026

Copy link
Copy Markdown
Member

Overview

This PR introduces mute toggles that can be accessed via an AudioStreamPlayer's inspector, and the scene tree.
While -80 dB (minimum volume in the inspector slider) is not really audible, the only way to truly mute audio is to either set linear volume to 0 (-INF dB, both unavailable to the editor) or muting in the bus. Adjusting the slider or muting in the bus are not desirable in every case, since one could just want to mute one or multiple players, and easily return to the previous levels.

mute_players_img_1
2026-07-02.18-22-30.mp4

Limitations

  • Mute only works for the Stream playback type

I'm not comfortable editing code related to the Sample playback type. A little too much. I suggest someone to try adding that. This limitation is mentioned in the documentation.

  • Mute only works in the regular/local scene tree

The toggle is not available in the remote tree. There was an attempt, but wasn't working properly. Again, I suggest someone to try adding that eventually, since it could be useful.

Notes for reviewers

In general, despite a few of my small contributions in this repository (mostly related to audio), I'm not a very experienced programmer. This is my first time modifying the AudioServer. Would appreciate someone checking that.
I'm also not super experienced with the editor code. Most of it was copied from code related to the visibility button, but modified a bit so it'd make sense.

I've tested the changes, and things seem to work on my end.

If a new button in the scene tree really is too much, I could make an alternative PR that just adds the mute property to AudioStreamPlayers, but then the proposal wouldn't be closed.

@Akosmo Akosmo requested review from a team as code owners July 2, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a 'mute' button beside audio nodes on the scene tree

1 participant