Skip to content
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

block duration assignment should set rtimes #183

Open
tomjnixon opened this issue Nov 21, 2023 · 1 comment
Open

block duration assignment should set rtimes #183

tomjnixon opened this issue Nov 21, 2023 · 1 comment

Comments

@tomjnixon
Copy link
Member

block duration assignment sets duration attributes here:

ttps://github.com/ebu/libadm/blob/9955fbd2941756140b3e4a47c1fdcef7d711e162/src/utilities/block_duration_assignment.cpp#L83C1-L88

If the block has a default rtime, it will still have a duration set, which is invalid.

Thus just needs block.set(block.template get<Rtime>()); added to ensure that rtime is set whenever duration is, and some tests.

Spotted by @davemar-bbc.

@tomjnixon
Copy link
Member Author

This code should also probably fix interpolationLengths, which can also be affected by rounding, an may be broken if the duration is reduced.

This should probably be a separate function, as the name (updateBlockFormatDurations) is quite explicit about what it does.

the equivalent EAR code is:

https://github.com/ebu/ebu_adm_renderer/blob/master/ear/fileio/adm/timing_fixes.py

... but because this doesn't issue warnings and doesn't account for audioObject times, it's a bit simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant