-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
ResourceImporterWAV: Allow configuring loop mode on import #59170
ResourceImporterWAV: Allow configuring loop mode on import #59170
Conversation
The new `edit/loop_mode` import options lets user choose to either: - Detect loop points from the WAV (default, same behavior as before) - Set the loop mode and loop points manually like in AudioStreamSample Fixes godotengine#46164.
210327d
to
b389ce5
Compare
Now that we allow for advanced UI for some resoucre types, it should be possible to have an editor to show the audio file and edit the loop points. |
We approved this in PR review meeting, though there's room for improvement on the UX as @reduz suggested. He'll write a proposal about it so this can be improved further by any interested contributor. |
Cherry-picked for 3.5. |
Toggling loop on and off should be part of editable settings together with pitch, volume, autoplay and such |
This is tricky because some AudioStreams cannot loop. AudioStreamMicrophone, AudioStreamGenerator, specifically. We could add a loop property to an AudioStreamPlayer potentially, which would attempt to loop whenever the stream runs out of samples. This could have unintended consequences though because I believe play() is not always allocation-free, especially in the case of ogg/vorbis streams. I agree the current UX could be improved though. I'm just not sure how to do it. |
If you have more thoughts on this though, there's an open proposal for it that we can continue discussion in godotengine/godot-proposals#3120 |
The new
edit/loop_mode
import options lets user choose to either:Previously the only options were to import loop points from WAV, or to force a full-length forward loop. There was no easy way to disable looping if it's embedded in the WAV, which confuses many users.
Fixes #46164, at least the most egregious part. The UX around editing loop points on an already imported WAV resource is still awkward.
Notes
3.x
backport, the compatibility should be preserved with the previousedit/loop
boolean option. Could possibly be added in this PR too formaster
if wanted.-1
to select the end frame (and that's the default value for "Loop End").simplescreenrecorder-2022-03-15_16.44.35.mp4