From feb72389aa4e1070fcbc888280ea65b178176460 Mon Sep 17 00:00:00 2001 From: ZoRo Date: Thu, 26 Aug 2021 09:48:17 +0100 Subject: Update source to be compatible with emscripten --- NaiveFFT/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'NaiveFFT/main.c') diff --git a/NaiveFFT/main.c b/NaiveFFT/main.c index 036bb79..6372c79 100644 --- a/NaiveFFT/main.c +++ b/NaiveFFT/main.c @@ -14,6 +14,10 @@ #include #include +#if __EMSCRIPTEN__ +#include +#endif + #include "fft.h" //test data array @@ -26,6 +30,9 @@ double data_q[DATA_SIZE] = {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f}; int main(int argc, const char * argv[]) { +#if __EMSCRIPTEN__ + printf("Wasm NaiveFFT module loaded\n"); +#else int i; // insert code here... @@ -95,5 +102,6 @@ int main(int argc, const char * argv[]) { strftime(buffer, 32, "%H:%M:%S", tm_info); puts(buffer); } +#endif return 0; } -- cgit v1.2.3