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

Fix pack allocation #73

Merged
merged 6 commits into from
Apr 9, 2024
Merged

Fix pack allocation #73

merged 6 commits into from
Apr 9, 2024

Conversation

tomjnixon
Copy link
Member

fixes the root cause of #53, and improves the testing around this

fixes #53

The specific bug is that whenever the result would contain multiple
distinct packs which only contain silent channels, multiple equivalent
solutions would be produced. This could cause an "Ambiguous format
references" error when the references from an audioObject are not in
fact ambiguous.

The data that triggers this is not useful, and causes an error
(rather than incorrect behaviour), so it was likely never triggered in
the wild.

When allocating new packs for silent tracks, the packs need to be
allocated in order, to avoid allocating both [p1, p2] and [p2, p1] with
silent tracks, as in the original bug. This is implemented by modifying
the list of possible packs to allocate in subsequent steps, by creating
remaining_packs in candidate_new_packs, and threading that through.
this will be used for testing the main implementation

the intent was to make this much simpler than the main implementation,
but that wasn't possible
add a test helper which checks the results of all implementations
against each other, and some basic properties (count or equality)
@tomjnixon tomjnixon force-pushed the fix_pack_allocation branch from d7955b8 to f47fb09 Compare April 9, 2024 15:50
@tomjnixon tomjnixon merged commit f47fb09 into master Apr 9, 2024
10 checks passed
@tomjnixon tomjnixon deleted the fix_pack_allocation branch April 9, 2024 15:55
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

Successfully merging this pull request may close these issues.

1 participant