Skip to content

fix: prevent channel shift when appending to an empty keep-alive queue#872

Open
roderickvd wants to merge 1 commit intomasterfrom
fix/queue-frame-alignment-channel-shift
Open

fix: prevent channel shift when appending to an empty keep-alive queue#872
roderickvd wants to merge 1 commit intomasterfrom
fix/queue-frame-alignment-channel-shift

Conversation

@roderickvd
Copy link
Copy Markdown
Member

When Player::connect_new calls mixer.add(queue) with an empty queue, UniformSourceIterator::bootstrap() captures channels=1 from the Empty placeholder and creates a Take(1) with a ChannelCountConverter(from=1). If a stereo source is then appended before the audio thread calls next(), that first sample passes through the wrong converter: L is treated as mono and duplicated, permanently shifting the stream by one sample and shifting channels.

Supersedes #870
Fixes #871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sample channel shift (L/R swap) when rapidly appending stereo sources to an empty player queue

1 participant