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

Audio gets muted completely under specific conditions #85353

Closed
Tracked by #76797
KoBeWi opened this issue Nov 25, 2023 · 3 comments
Closed
Tracked by #76797

Audio gets muted completely under specific conditions #85353

KoBeWi opened this issue Nov 25, 2023 · 3 comments

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Nov 25, 2023

Godot version

4.2 rc2 / 4.1

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

In my project I managed to meet some very specific conditions that break the audio system. This looks like engine bug, because it requires all of the specific steps and makes the audio die completely.

Here's the bug (I'm using debug teleport to move faster):

Output.mp4

Note how in 0:10 the video goes completely silent and then after the gate animation the sounds plays normally. During that silence, and audio track is supposed to play.

Here's video with the intended effects:

Output.mp4

Note that this is the exactly the same build! The silence is 100% reproducible and the correct sounds is also 100% reproducible. If you look closely, the only thing that changed is that in the second video I didn't touch the save point.

Now, this is the interesting part. In order to trigger the bug I need to:

  • start in the desert area. When I change areas, the music transition makes two music tracks play together and crossfade smoothly
  • touch the save point to play its opening and closing animation
  • when the gate closes, the music is silenced (I tween it to 0 volume)

If I skip any of these steps, the bug does not happen.

As for the bugged silence itself, it's not that the animation audio is not playing. All sound is completely disabled, I tried playing other sound affects at that moment and they are muted too.

EDIT:
After further investigation, silencing the music (Jukebox.silence() call) is the direct trigger of the bug, all other steps are just a setup. I tried silencing the music later and if I call the method mid-animation, the audio goes out immediately. Also it has something to do with 2 music players (see Jukebox.tscn). When I stop the unused one before calling silence() the bug does not happen.

Steps to reproduce

Start the MRP and repeat what I did in the first video. You can use F1 to teleport character to cursor.

Minimal reproduction project

Unfortunately, since the reproduction steps are extremely convoluted, I am not even sure how to extract it into a minimal project. I stripped down my game down to some essential files required to reproduce the bug. That's still 90MB though.

https://www.mediafire.com/file/pwz70vuxjtrqo86/repro_audio_oblivion.zip/file

@KoBeWi
Copy link
Member Author

KoBeWi commented May 22, 2024

4.3 dev 6
image
While the symptoms were fixed, I wonder if it's user error or I did something that triggered engine bug. I don't even know where the error comes from.

@KoBeWi
Copy link
Member Author

KoBeWi commented May 22, 2024

Don't use linear_to_db(0).

@KoBeWi KoBeWi closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@akien-mga
Copy link
Member

See #61935

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

No branches or pull requests

3 participants