-
-
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
Add AutoVolume
option to AudioPlaybackTrack
to prevent to override AudioStreamPlayer
volume
#55218
Add AutoVolume
option to AudioPlaybackTrack
to prevent to override AudioStreamPlayer
volume
#55218
Conversation
cc0c2d8
to
1adbc05
Compare
59e1e51
to
83ed198
Compare
I don't think this needs a full review from the audio team, but I do want to mention that AutoVolume seems like a confusing name for what this option does. I can't think of anything better though. |
If there is a better name for this option, the change is fully acceptable :) I respect the decision of the maintainer. |
83ed198
to
538774a
Compare
Rebased for resolving conflicts. Discussion in Contributors Chat with ellenhp:
@akien-mga Please review when you have time. |
Need to add to some methods in |
I managed this in #56902, but reduz is not that positive about retargeting at least for 4.0, so I don't know if it will be merged by 4.0 or not. |
0a409de
to
a6683f1
Compare
Rebased & fixed. @reduz I think that it is ready to go. Preview (please turn on volume): Desktop.2022.07.19.-.22.55.20.05.mp4test project: |
5ec4258
to
1af9432
Compare
On one side I understand why this is wanted, the current code is not very good because it has to be fixed from AudioStream/AudioServer so the streams are faded correctly. But I am not certain that this is the best solution. The volume should just blend correctly instead, as this feels more like a hack to me. |
I think the right solution for this would be for the AnimationTree (or Player) to instantiate an AudioStreamPlayback for each clip (and cache it), and have a lower level API in StreamPlayers to hand them out with a volume and position, but this is quite a good amount of work to do. |
@reduz Do you think that it is the right way to simply remove this implicit volume overwrite and implement a log-scale adjustable volume interface in StreamPlayer and let the user arbitrarily adjust the volume with ValueTrack? |
@TokageItLab I am not sure, but defintely I think StreamPlayer needs more work to make this work as intended. |
@reduz I mean, why not just have the user explicitly create a track called The only thing that makes sense in the current implementation is that the blending is done in the Wouldn't sufficient to implement a |
@TokageItLab because the main problem here is that you do want to play more than one stream at the same time and blend them properly, this is not possible now even if the user does something manually. |
@reduz Do you mean caching and playing back multiple audio source in one AudioStream and adjust volume? That is currently not possible, but at least I think that this implicit volume overwriting should be removed, even when multiple AudioStreams are placed, as it prevents the audio from playing back. |
@reduz It may indeed be necessary to change to a lower layer to get the blending correctly, but this PR is necessary for cases where we do not want to do the blending. As I have said many times, the current implicit blending prevents us from using AudioTrack if we want to play sound effects in our animation. It forces us to use MethodTrack. For now, we need to implement this AutoVolume option to prevent that implicit blending. The PR for correct blending can be send in the future. |
aba52d4
to
13d3278
Compare
13d3278
to
dfe4fe4
Compare
As reduz said above it needs to be implemented at a lower layer. Close this PR and track the issue at #65750. |
Context: #49099
https://www.youtube.com/watch?v=0ztTcX7Z-Do
Implemented an option in
AudioPlaybackTrack
to handle that whether to allowAnimationTree
to overrideAudioStreamPlayer
volume.Includes little code style fixes and
loop_wrap
’s undo redo bug fixes in animation track editor.