AudioStreamPlayer annoying "pop" noise

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Suleymanov

AudioStreamPlayer autoplay and stream_paused is set to true so that I can start it by setting stream_paused to false. It works well except it makes one short “pop” noise when scene is just launched.

Is there any workaround to eliminate that annoying “pop” noise?

Note: My audio file is with fade-in and fade-out and it doesn’t start immediately either. I also tried to set volume_db to -80 and gradually increase it, yet no success, “pop” is still there.

Thank you for your time!

I have never found a solution for this :(. just commenting in case someone posts an answer.

scrubswithnosleeves | 2021-03-15 20:39

:bust_in_silhouette: Reply From: Calinou

This is a known issue: This is partially fixed in 3.2.4rc4, but not in all cases.

:bust_in_silhouette: Reply From: Zetromax_studioz

Hi, the cause of this is the way Input.is_action_pressed("...") works. In this case we have to outsmart the editor.
First create a new if function:-

if Input.is_action_just_pressed("..."):
if not Input.is_action_pressed("..."):

This way when you press the button, the audio will start playing but if you are not pressing it it wont play.

the variable audio can be declared as onready var audio = $AudioStreamPlayer

Hope this helped you,

I am 13 btw. devlping games for a while now

Zetromax, first of all, hats off for your courage to learn how to develop games at the age of 13! Keep up the drive!

The problem is not related to Input, it just makes short pop noise wherever you use it, with or without input. Like, if something happens, play the stream. It pops anyway. Hope it is addressed in Godot v4.0

Suleymanov | 2021-05-19 16:02