Mercurial > hg > svcore
diff data/model/test/TestFFTModel.h @ 1104:393134235fa0 simple-fft-model
Two-channel test
author | Chris Cannam |
---|---|
date | Tue, 16 Jun 2015 20:32:44 +0100 |
parents | 0c351e061945 |
children | 457a1a619c5f |
line wrap: on
line diff
--- a/data/model/test/TestFFTModel.h Tue Jun 16 20:28:23 2015 +0100 +++ b/data/model/test/TestFFTModel.h Tue Jun 16 20:32:44 2015 +0100 @@ -168,6 +168,31 @@ { { {}, {}, {}, {}, {} } }, 4); } + void twochan_simple_rect() { + MockWaveModel mwm({ Sine, Cosine }, 16, 4); + // Test that the two channels are read and converted separately + test(&mwm, RectangularWindow, 8, 8, 8, 0, + { + { {}, {}, {}, {}, {} }, + { {}, {}, {}, {}, {} } + }, 4); + test(&mwm, RectangularWindow, 8, 8, 8, 1, + { + { {}, { 0.f, 2.f }, {}, {}, {} }, + { {}, { -2.f, 0.f }, {}, {}, {} } + }, 4); + test(&mwm, RectangularWindow, 8, 8, 8, 2, + { + { {}, { 0.f, 2.f }, {}, {}, {} }, + { {}, { -2.f, 0.f }, {}, {}, {} } + }, 4); + test(&mwm, RectangularWindow, 8, 8, 8, 3, + { + { {}, {}, {}, {}, {} }, + { {}, {}, {}, {}, {} } + }, 4); + } + void nyquist_simple_rect() { MockWaveModel mwm({ Nyquist }, 16, 4); // Again, the sign is flipped. This has the same amount of