Added software::resampling::Context::get_out_samples to bind swr_get_out_samples #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When resampling, to make sure no samples are buffered internally, it's important to have a buffer large enough to fit all these samples. Up to this point there was no way of knowing how many samples should be allocated up front, so this PR adds a binding to that from libswresample.
Unresolved questions:
swr_get_out_samples
accepts anint
, but I'm sure it expects the input sample count to be positive. It's probably an oversight on libswresample's part, so I kind of fixed it, and made the method return an error if the argument passed does not fit in ani32
. It feels quite janky though so I need an opinion from the maintainers.