(2023-01-19, 13:42)Tanzbaerli Wrote: (2023-01-19, 12:54)SoulReaver Wrote: Nice work and I can confirm that the supertoto1977 arm64 build for my Shield Pro 2019 also fixes all audio and video issues in TrueHD IEC for me as well.
Now 3 testers confirm that the Supermoto fix is "the best" and is running by all testers without problems.
(on the Shield devices 64 and 32 bit)
Is there a technical reason not to use his fix in the new Kodi20 nightly builds and later in the stable?
Is there a negative effect on other devices?
Great work Supermoto !
Technical reason: It's not correct. It returns the wrong delay (factor 2), which causes a fallback delay of 0 ms, in fact it produces stuff like "-170" or "-190" or even "3800 ms" over the whole time, the fallback code in Audio Engine adjusts this to "0ms". With this 0 ms, the buffers are faked so dry towards VideoPlayer that no adjustment at all happens and it tries as fast as it can to add new packages. This combined with low buffers of < 16 ms exactly produces this -> no A/V sync maintaining at all anymore. So it keeps it running, which is the reason you don't see an effect. If you carefully check the A/V sync, you will see that it slowly drifts. The reason for your micro stutters or for the short TrueHD outtage is, that exactly this drifting is corrected. And fixing this drift by either checking that the delay is properly returned or the vblank is not missing one is a solution.
There is one thing where the change does exactly the right thing: VideoPlayer now knows the real length of the TrueHD samples, here a div by two was missing. I also have seen that in the code and fixed it properly. For the other technical reasons (don't mix them with but, but, but it works for me reason) were already given in the github pull request.
Which is why I kindly asked in the github report to fix the root-cause and not just "stopping" the player to adjust A/V sync when it runs off too much.
See - another "non-fix" would be to adjust the threshold to 400 ms instead of 200 ms for Videoplayer to interfere ... but is this again a fix? No, it's again a workaround.