]> git.nihav.org Git - nihav.git/commitdiff
binkaud: fix mono RDFT decoding
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 13 Feb 2025 17:51:02 +0000 (18:51 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 13 Feb 2025 17:51:02 +0000 (18:51 +0100)
nihav-rad/src/codecs/binkaud.rs

index 3880f45d117e423f5d2470833c4b46c1c4dbb287..0e17db1ea76e15ac4134c9b2f7c5408c99990a88 100644 (file)
@@ -135,6 +135,9 @@ impl BinkAudioDecoder {
                         let buf = &mut self.coeffs[0..];
                         rdft.do_rdft_inplace(std::mem::transmute::<&mut [f32], &mut [FFTComplex]>(buf));
                     }
+                    for i in (0..self.coeffs.len()).step_by(2) {
+                        self.coeffs.swap(i, i + 1);
+                    }
                 },
             _ => unreachable!(),
         };