-
Notifications
You must be signed in to change notification settings - Fork 16
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
Sound effects break off and stop working after a while #75
Comments
Hi, so it seems like each footstep is cutting off before the sound is done, right? Does the same not happen a regular AudioStreamPlayer3D? Your code looks reasonable at a glance but this kind of issue seems like it would happen in both cases. BTW, the way I've handled footsteps in my game is for there to be a single player stuck to the player's feet with a single AudioStreamPolyphonic. When you want to play a footstep sound, you just run: audio_player.get_inner_stream_playback().play_stream(your_footstep_stream) And you don't have to worry about setting up timers and allocating tons of audio players (sure, doing it like I described means your footsteps are technically moving along with you, but I doubt that anyone will notice). |
@stechyo Thank you for answer.
No. With AudioStreamPlayer3D it work as expected. The reason i added the timer it that i thought that effect might break because of instant remove the AudioPlayer before the effect performed completely.
It makes sense, but i suppose there's no implemented SteamAudioPlayerPolyphonic yet, right? :) |
There doesn’t need to be a SteamAudioPlayerPolyphonic. You create a SteamAudioPlayer and assign to it an AudioStreamPolyphonic on the editor, or through code. Then when you want to play the streams you use the code in my example. |
Got you. Thanks. |
Are you using the provided fork of Godot?
Yes
Godot-steam-audio version
0.2.2
Steam-Audio version
Included in the version i used
Operating System
Windows 11
Describe the bug
Sound effects break off and stop working after a while. To play some sound effects, I instantiate SteamAudioPlayer with parameters at a specified position and remove it after 5 seconds once playback finishes.
Here's a video:
https://github.com/user-attachments/assets/7f42bd76-e2ca-4baf-9e7e-5cda7dce653b
I suppose i could do something wrong here.
Expected behavior
To hear sound effects completely.
Example project, code snippet, or screenshots
P.S. Thank you for this addon.
The text was updated successfully, but these errors were encountered: