Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

FYI, the channels aren't swapped #2

Closed
marcan opened this issue Sep 2, 2020 · 1 comment
Closed

FYI, the channels aren't swapped #2

marcan opened this issue Sep 2, 2020 · 1 comment

Comments

@marcan
Copy link

marcan commented Sep 2, 2020

I figured this out later; the card returns the channels in the correct order, but with an offset to the data (the first sample is only the R channel).

R LR LR LR LR LR...

So the correct solution is to interpret the data as L-R pairs, and if the channels end up "swapped", do not swap them, but instead throw away two bytes at the beginning (one mono sample) and try again.

If you try to fix the swap by swapping channels, then you end up with a 1 sample phase offset between channels, which is incorrect and will introduce subtle stereo imaging issues and a comb filter effect if downsampled to mono.

ToadKing added a commit that referenced this issue Sep 5, 2020
correctly fixes issue with MS2109 chips
fixes #2
@ToadKing
Copy link
Owner

ToadKing commented Sep 5, 2020

Thanks for that info. Pushed a proper fix for the issue and removed the swap channels code since combining the two different paths would make things more complicated than they should be. This tool was mainly made for those MS2109 devices anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants