WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes incorrect sample_rate() and channels() metadata returned by
SourcesQueueOutput when transitioning between sources with different
formats or from an empty queue. This caused audio distortion at
boundaries where metadata changes occurred.
Changes:
- Clarified Source::current_span_len() contract: returns total span
size, Some(0) when exhausted
- Fixed SamplesBuffer to return Some(total_size) or Some(0) when
exhausted (was None)
- Fixed SamplesBuffer::size_hint() to return remaining samples
- Updated SourcesQueueOutput to peek next source metadata when current
is exhausted
- Added Source::is_exhausted() helper method for cleaner exhaustion
checks throughout codebase
- Implemented ExactSizeIterator for SamplesBuffer
- Improved SkipDuration precision to avoid rounding errors
This supersedes PR #812 with a cleaner implementation following the
proper current_span_len() contract. Enabled previously ignored
queue::tests::basic test to prevent regressions.
Fixes#811
Co-authored-by: 0----0 <[email protected]>
0 commit comments