+2 votes

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!

Godot version 3.2.3
in Engine by (335 points)

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

2 Answers

0 votes

This is a known issue: https://github.com/godotengine/godot/issues/22016. This is partially fixed in 3.2.4rc4, but not in all cases.

by (12,835 points)
0 votes

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

by (14 points)

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.