-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Make the retrieval of audio tracks consistent and implement trimming to AnimationTrackEditor shortcut and clean-up #86661
Conversation
7db175a
to
d5b5752
Compare
667ecb7
to
2de93c2
Compare
2de93c2
to
cb9ea4d
Compare
cb9ea4d
to
fcaece0
Compare
e4c3d7c
to
565e034
Compare
fcb34ac
to
851dad6
Compare
851dad6
to
bbba5a8
Compare
bbba5a8
to
8b2c82b
Compare
cba5576
to
f8b351f
Compare
@TokageItLab This needs a rebase so we can review and merge into Godot Engine master. |
f8b351f
to
dde486f
Compare
dde486f
to
6c116eb
Compare
6c116eb
to
1322ad6
Compare
02402c5
to
aaf3775
Compare
Due to concerns from @lyuma , options that are only valid for Audio now clearly indicate it and it will gray out when Audio Key is not selected. |
aaf3775
to
69e9054
Compare
Needs rebase after #86629. |
69e9054
to
4659090
Compare
Thanks! |
This crashes for me:
When using the start/end offset options Seems like double len = stream->get_length() - animation->audio_track_get_key_end_offset(E.key.track, E.key.key); Will test further soon |
Is indeed when the key does not have an associated stream, will write a fix Edit: Done |
#85088 occurred in 4.2.0 and should be temporarily fixed in 4.2.1. However, it is causing a more serious regression as #86147. Therefore, #86227 must be merged and cause problem #85088 again.
Solution:
Allow the audio track to get the key from the middle of the track by forcing
NEAREST
to get the key. This may cause double playback, but unlike a method track, the same stream is never played twice at the same time, so this should not be a problem.However, keys placed in negative time can only be retrieved during seek. This means that the key will not be retrieved at loop time.
The reason for that is the difference in the search range between
track_find_key()
andtrack_get_key_indices_in_range()
. To begin with, it is not expected to access keys outside the animation range in the playback process, so I add an argumentp_limit
totrack_find_key()
to limit the range.As a result, audio keys placed at negative time will not be played, although playback of audio keys from the middle will be permitted. Finally, add an option to Clean-up to trim them, then close #85088.