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

Pause audio when game is paused #104420

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pafuent
Copy link
Contributor

@pafuent pafuent commented Mar 21, 2025

Fixes #68880

Implementation based on #99555

@pafuent pafuent requested a review from a team as a code owner March 21, 2025 00:33
@pafuent pafuent force-pushed the pause_audio_when_game_is_paused branch from b0a1fa9 to 834a39c Compare March 21, 2025 11:36
@AThousandShips AThousandShips added this to the 4.x milestone Mar 21, 2025
@akien-mga akien-mga requested a review from YeldhamDev March 21, 2025 12:30
@pafuent pafuent force-pushed the pause_audio_when_game_is_paused branch from 834a39c to 8c69d6c Compare March 21, 2025 16:09
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected. I've also tested using the mute button while the project is paused and it works correctly (audio isn't being restored after resuming when it shouldn't).

Code looks good to me.

ProfessorOctopus added a commit to ProfessorOctopus/godot that referenced this pull request Mar 26, 2025
Fix crash when removing breakpoints from DAP, and multiple fixes godotengine#104523 by rsubtil
TextureEditors: Compile shader/material only once godotengine#104488 by arkology
Renderer: Warn when images need to be converted due to their formats being unsupported by hardware godotengine#104480 by BlueCube3310
Optimize startup times by using ubrk_clone instead of ubrk_open. godotengine#104455 by Ivorforce
Pause audio when game is paused godotengine#104420 by pafuent
Optimize reverb by removing stray volatile from the undenormalize function signature. godotengine#104239 by Ivorforce
Add Memory::alloc_static_zeroed to allocate memory that's filled with zeroes. godotengine#104124 by Ivorforce
Switch occlusion culling to be based on depth instead of Euclidean distance godotengine#103798 by Rudolph-B
Optimize Object::cast_to by assuming no virtual and multiple inheritance, gaining 7x throughput over dynamic_cast. godotengine#103708 Ivorforce
Optimize Projection::determinant() godotengine#103671 by MaxIsJoe
Reuse Sprite3D meshes across nodes when possible. godotengine#103312 by chocola-mint
Reduce frequency of save_default_environment() calls godotengine#102991 by KoBeWi
Optimize GDScriptLambdaCallable by skipping the unnecessary ObjectDB lookup for script. godotengine#102930 by Ivorforce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audio does not stop when pausing the project from the editor
4 participants