Skip to content

Queue exposes format changes after unknown-length spans - #945

Open
kapok-4o wants to merge 1 commit into
RustAudio:masterfrom
kapok-4o:fix/adapter-16
Open

kapok-4o wants to merge 1 commit into
RustAudio:masterfrom
kapok-4o:fix/adapter-16

Conversation

@kapok-4o

Copy link
Copy Markdown

When the active source returned None from current_span_len(), downstream converters could keep using its channel count after the queue moved to a different source.

For unknown-length spans, expose one frame at a time and read one frame ahead to discover the end of the current sound. At that boundary, use the upcoming sound's span and format metadata. Tests cover mono to stereo to mono conversion and seeking at either channel position of a prefetched stereo frame.

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