// This file is part of the 64k demo project. // It validates the mathematical properties of the Hamming window. // Ensures the window peaks at the center and has correct symmetry. #include "audio/window.h" #include #include #include int main() { printf("Running HammingWindow tests...\n"); float window[WINDOW_SIZE]; hamming_window_512(window); // Check symmetry for (int i = 0; i < WINDOW_SIZE / 2; ++i) { assert(fabsf(window[i] - window[WINDOW_SIZE - 1 - i]) < 1e-6f); } // Check peak (should be at the center for even size, it's actually split // between 255 and 256) assert(window[255] > 0.99f); assert(window[256] > 0.99f); printf("HammingWindow tests PASSED\n"); return 0; }