-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Handle clicking on AudioStream change in AudioStreamPlayer2D/3D #30827
Comments
I'd be interested in giving this a try |
is this issue still open? I would like to work on it. |
@alokranjan1234 It seems like nobody has submitted a pull request yet, so go ahead 🙂 |
Haven't had time yet, so go ahead |
Anyone still working on this? |
@samsindt It doesn't seem like anyone is working on it currently, so you could give it a try. |
@samsindt are you working on this still? I was reading the code and have a few questions. |
@hbina I am still working on it but am having trouble replicating the bug on MacOS. Feel free to give it a try. |
Kewl, I don't quite understand how to apply the changes from reduz's patch because there are lots of different functions from there and here... |
Removing the |
I am having this issue in my game. But reading your comments ... gave me and idea. Spawn new StreamPlayer3D node every time new sound is played. And delete it when sound ends. I love you guys! |
I am having this problem (and other audio problems which don't belong with this issue) on 3.2 stable with AudioStreamPlayer on Linux. It doesn't matter if the audio is wav or ogg. The audio is flawless if played with automatic looping, but has painfully obvious clicks/static when played by changing streams. (AudioStreamPlayer.stream=x). |
@SoapSpangledGames As a workaround, try creating a new AudioStreamPlayer after freeing the previous one. |
The problem persists when I change my code to create a new AudioStreamPlayer after freeing the previous one. Initially, I created the AudioStreamPlayer as part of the scene design, and just changed the stream as each sound finished playing. After your suggestion, I removed it from the scene design in the IDE, and created it in code, queue_free()'ing it and recreating it in my finished() event handler. Either way, the clicking is still present. |
@SoapSpangledGames How long is the sound? If the workaround doesn't work, then this could be a different problem (#22016). |
The sounds are 0.1 seconds to 0.7 seconds (the 0.7 second sound is silence), played in rapid succession. After reading through (#22016), I think that is my issue. |
This should be fixed in 4.0. @akien-mga Do we want to keep this issue open for 3.x? |
Let's closed as fixed in 4.0 then. If anyone wants to work on a non-intrusive fix for this issue in 3.x though, feel free to. |
Godot version:
3.2 master (3a68b24)
OS/device including version:
All
Issue description:
#25974 aimed at fixing a clicking noise when changing AudioStreams as reported in #25087, but it introduced bugs and was reverted by #28469.
Then @reduz implemented a proper fix for
AudioStreamPlayer
in 040b59c, but did not do it forAudioStreamPlayer2D
andAudioStreamPlayer3D
. The code from this commit should be ported over to those two classes.The text was updated successfully, but these errors were encountered: