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

AudioStreamPlayer will play upon re-entering tree even if paused #49153

Open
Tracked by #76797
KoBeWi opened this issue May 27, 2021 · 2 comments
Open
Tracked by #76797

AudioStreamPlayer will play upon re-entering tree even if paused #49153

KoBeWi opened this issue May 27, 2021 · 2 comments

Comments

@KoBeWi
Copy link
Member

KoBeWi commented May 27, 2021

Godot version:

364ea7f / 3.3

Steps to reproduce:

  1. Add audio stream player (any)
  2. Make it autoplay
  3. Remove it from tree
  4. Pause
  5. Re-add it to tree
  6. It will play even though it should be paused

Minimal reproduction project:

AudioRepro.zip
Space to toggle pause
Z to remove player from tree for 1 second
Try pausing while player is outside tree.

@KoBeWi
Copy link
Member Author

KoBeWi commented Feb 25, 2022

Seems like this was fixed on master.

@KoBeWi KoBeWi added this to the 3.5 milestone Feb 25, 2022
@bumblemeow
Copy link

A work-around I've been using is to set stream_paused = true, then immediately call play():

$IntroMusic.stream_paused = true
$IntroMusic.play()

The stream will remain paused until the game is unpaused as the play() function respects the paused state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants