PaulStoffregen / Audio

Teensy Audio Library
http://www.pjrc.com/teensy/td_libs_Audio.html
1.07k stars 398 forks source link

input_tdm: every odd channel had every other sample swapped #428

Closed ccrome closed 7 months ago

ccrome commented 2 years ago

In every odd channel in TDM input (1, 3, 5, 7, 9, 11, 13, 15), every other word was swapped due to an incorrect copy from 32-bits to 16-bits.

This fix corrects the odd channels. The Shift-by zeros and the extraneous logical ands are there for clarity, and I verified they don't end up affecting final code optimization as long as optimization is turned on.