Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music should stop when changing window #14026

Closed
Zughy opened this issue Nov 21, 2023 · 8 comments · Fixed by #14083
Closed

Music should stop when changing window #14026

Zughy opened this issue Nov 21, 2023 · 8 comments · Fixed by #14083
Labels
@ Client / Audiovisuals Concept approved Approved by a core dev: PRs welcomed! Feature request Issues that request the addition or enhancement of a feature Sounds UI/UX

Comments

@Zughy
Copy link
Member

Zughy commented Nov 21, 2023

Problem

If you're playing, for instance, a game with background music and you change window, the music keeps playing. If I'm changing window, I'm probably doing something not related to the game, possibly that requires me to focus and detach from the game, thus I expect it to stop

Solutions

Make it stop

Alternatives

Ask people to press M every time (?)

Additional context

I'd consider this a bug but the bug form is off-putting

EDIT: I'll let core devs decide

@Zughy Zughy added @ Client / Audiovisuals Feature request Issues that request the addition or enhancement of a feature Sounds UI/UX Bug Issues that were confirmed to be a bug and removed Bug Issues that were confirmed to be a bug labels Nov 21, 2023
@Desour
Copy link
Member

Desour commented Nov 21, 2023

Other games have a setting for this (ddnet for example).
We should also have such a setting.
Unconditionally muting sounds when unfocused would be bad for players that still want to enjoy the game's music while unfocused.

@Desour Desour added the Concept approved Approved by a core dev: PRs welcomed! label Nov 21, 2023
@Zughy
Copy link
Member Author

Zughy commented Nov 21, 2023

@Desour agreed. I think that muting should be the default though

@NathanSalapat

This comment was marked as off-topic.

@Desour

This comment was marked as off-topic.

@jordan4ibanez
Copy link
Contributor

jordan4ibanez commented Nov 23, 2023

I'm pretty sure that the program api can infer if the window is focused. Perhaps in the soft openal implementation at the root when it tries to play sounds it can simply do something like

if (!this->focused) {
  return;
}
// Rest of procedure

@rubenwardy

This comment was marked as off-topic.

@Athozus
Copy link

Athozus commented Dec 6, 2023

It must be a setting. Example of use case: I'm often waiting for train and I go on another window until I hear a train is coming. I would not like to stay on my screen doing anything for several minutes, at least most than just muting the sound of my window. I understand that's annoying, but the balance is in favor of, by default, enable the sound.

@srifqi
Copy link
Member

srifqi commented Dec 7, 2023

I like the approach of osu!lazer (a rhythm game) which has two master volume settings: one for the main master volume and another for the master volume when the window is inactive. This gives players more flexibility in setting sound volume (which can be zero/no-sound).

Except the audio offset setting, other settings shown below are in their default value:

osu!lazer audio settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client / Audiovisuals Concept approved Approved by a core dev: PRs welcomed! Feature request Issues that request the addition or enhancement of a feature Sounds UI/UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants