libobs: Fix audio transitions with output scaling - #13812
prgmitchell wants to merge 1 commit into
Conversation
|
The proposed fix seems correct to me. |
derrod
left a comment
There was a problem hiding this comment.
This solution only works as long as the secondary mixes are all encoder-only, I don't know if that's ever not the case right now (e.g. with NDI or DeckLink outputs) but it might not be in the future.
Perhaps a more robust way of doing this is to deduplicate on the view and ensure each of them is only iterated once.
937541c to
2d0e041
Compare
|
Thanks everyone for taking the time to review....what @derrod mentions makes sense so I have tried my best to make the changes but once again would appreciate as many eyes as it can get as I am very much doing a "learn as you go" thing with C here. I have added a local for the mix as suggested by @notr1ch and am now looping through the earlier mixes looking for the same view. |
Only process each video view once when building the audio render tree to avoid falsely treating sources as duplicates.
2d0e041 to
9e2d666
Compare
Description
Encoder output scaling creates an encoder-only video mix which causes the same audio tree to be scanned twice. Previously this wasn't an issue but after commit 50cdabbb5 added duplicate audio source detection this caused these sources to be marked as duplicates and mixed outside the transition audio path. This change ensures we only process each video view once when building the audio render tree. Definitely needs a review, probably from @pkviet who would be the most familiar with this and I have no doubt there could be something I am missing despite how much research I tried to do beforehand.
Motivation and Context
Fixes #12912
How Has This Been Tested?
Created two scenes with separate audio sources both playing audio, set a fade transition with 5000ms and tested with both rescaling enabled and disabled. Without these changes, the audio would hard cut instead of smoothly fade when rescaling was enabled. After these changes, the results are identical whether rescaling is enabled or disabled and the audio fades smoothly.
Types of changes
Checklist: