-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
AudioStreamPlayer keyframe is silent if the AudioClip starts at an negative time position #85088
Comments
To be precise, since 4.2, if the current position is in the middle of an audio track key, there is no longer the ability to playback the key currently on it during playback. Probably this was the case with AnimationTree prior to 4.2. BTW, The behavior of AudioTrack and AnimationPlaybackTrack is very similar; They are basically based on the "firing playback at the beginning of the key" feature. Since before 4.2, AnimationPlaybackTrack does not handle playback from the middle of the key, but only for AudioTrack , the playback in the middle of the key feature was hard-coded into AnimationPlayer, but now AudioTrack has followed AnimationPlaybackTrack and this problem has occurred. In order to handle playback from the middle of the tracks correctly, the algorithm for retrieving those keys will need to be reworked, which will take a bit of time. What could be implemented immediately would be a trimming shortcut such as
to set the offset immediately. This would provide a workaround to allow the user to easily set the offset by selecting a key with a negative position and trimming it with the current position set to 0. |
Well this was very annoying. Happened to be working on a project that relied heavily on being able to play certain sections of AudioTracks at certain keyframes, and now it seems like I will be unable to continue my project because I have made progress in the 4.2 version and the 4.2 project is not backwards compatible with the 4.1.3 version. And it apparently hasn't been fixed within weeks of the stable being released. |
For those like me who are impatient and require a workaround, editor tool script is here to save the day! Below is a quick and dirty work around which utilizes the power of @tool and another scene to get an AudioStreamPlayer to run at the position of where your keyframes are in an animationplayer! All you must do is simply choose your animation player node and your audio stream player node, set enabled to true, attach the script to a scene or a node and voila. Until this gets fixed, this is good enough for me, this is my Hopeful Tool, because I was hopeful that it would work and it did.
|
Perhaps in 4.2.1 playback from the middle is temporarily allowed, but that is causing problems and I am not sure what will become of it in 4.2.2. In conclusion, playback from the middle should be allowed, but negative time keys should not be obtained. I think #86661 should provide the fine workaround possible at this time for this problem. |
Godot version
v4.2.rc1.mono.official [ad72de5]
System information
Godot v4.2.rc1.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated GeForce GTX 1070 () - Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 Threads)
Issue description
4.1 Behaviour: If an AudioClip is positioned at an negative number inside the animation player. The Audio plays Exact at the 0 position.
4.2 Behaviour: The clip is silence if played. Also if played by the play button of the animation player
This bug is not critical because it can be worarround by cutting the animation clip inside the player so it does not need to be positioned at an negative number. But on large projects it requirest many refactors.
Steps to reproduce
Create an Scene with an AnimationPlayer Node and an AudioStreamPlayer Node.
Create a new Animation.
Drag and Drop an Audio File inside the animation player and place its start below zero.
In my Case the Audio file was mp3
Minimal reproduction project
NA, Because i did not know how to upload it. But it is easy to reproduce
The text was updated successfully, but these errors were encountered: