bevyengine / bevyengine/bevy

Make GlobalVolume change running audio

Open
#18,952 0 comments 2 reactions 0 assignees View on GitHub
A-Audio C-Feature C-Usability D-Straightforward
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

In a settings menu, users want to change the volume of music that is currently playing.

## What solution would you like?

`GlobalVolume` already exists, let's make also affect currently playing volume :)

## What alternative(s) have you considered?

Make the user write [this boilerplate](https://github.com/TheBevyFlock/bevy_new_2d/blob/3b236485b5459eb4032a151dc3fae49be7b306ec/src/audio.rs) or move it into a third party plugin.

Note to any interested readers: this link shows you an example of how to implement this feature :)

## Additional context

This issue came up while [implementing a settings menu for bevy_new_2d](https://github.com/TheBevyFlock/bevy_new_2d/pull/374)

Contributor guide

Open the contributing guide

Research direction

Start by reading the GlobalVolume implementation in Bevy and compare it with the linked src/audio.rs example from bevy_new_2d. Trace how currently playing audio is managed, then verify that changing GlobalVolume updates active music as well as future playback.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.