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 clips and pops when thruster audio plays in rapid succession #1

Closed
vanfleet-dev opened this issue Jul 13, 2022 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@vanfleet-dev
Copy link
Owner

Godot version:

v3.4.4 stable

OS/device including version:

ubuntu 20.04.4 lts

Issue description:

When trying to modify the audio for the player ship thrusters I have found the bug(s) detailed below:

godotengine/godot#22016
godotengine/godot#12307

It seems there are multiple sources for the audio clipping and pops introduced by changing the audio file. Some are from the audio file being started and stopped in rapid succession.

The way ThrustersAudioPlayer (AudioStreamPlayer2D) and LoopingAudioStreamPlayer2D.gd are setup to use three different audio files to fade into and out of the loop is a possible source of issue. When new audio plays while previous audio is finishing you get a clip.

ThrustersAudioPlayer is added to the scene in PlayerShip.tscn line 55. The node is instantiated in Travel.gd script lines 7 and 15-19.

@vanfleet-dev vanfleet-dev added the bug Something isn't working label Jul 13, 2022
@Kim-Lancaster
Copy link
Contributor

Hey, I took a look at this and I think the simplest thing to do would be to remove the fade in fade out loops and see if we still get the same popping and clipping. I'll check it out and let you know!

@vanfleet-dev
Copy link
Owner Author

Thank you. I added a new thruster audio loop for testing with your changes.

@Kim-Lancaster
Copy link
Contributor

I changed the code to only use one audio file for the thrusters. But, the audio sounds abrupt now without the fade-in fade-out, because it's initiating from the movement of the player's ship. I tried initiating it from the user key press and it makes for a better sound transition. If your interested in that I can pull request with that included.

@vanfleet-dev
Copy link
Owner Author

That's great! I'm fine with the additional change.

@vanfleet-dev
Copy link
Owner Author

Fixed by Kimberly Lancaster on commit a19c53d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants