diff options
author | ZoRo <dos21h@gmail.com> | 2021-08-26 09:48:17 +0100 |
---|---|---|
committer | ZoRo <dos21h@gmail.com> | 2021-08-26 09:48:17 +0100 |
commit | feb72389aa4e1070fcbc888280ea65b178176460 (patch) | |
tree | 4e8f0561958fb51842a13adec237184a70de276a /NaiveFFT/main.c | |
parent | 3834bc793857aae02198d8f4c8a8373957269678 (diff) | |
download | NaiveFFT-feb72389aa4e1070fcbc888280ea65b178176460.tar.gz NaiveFFT-feb72389aa4e1070fcbc888280ea65b178176460.zip |
Update source to be compatible with emscripten
Diffstat (limited to 'NaiveFFT/main.c')
-rw-r--r-- | NaiveFFT/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 <time.h> #include <stdint.h> +#if __EMSCRIPTEN__ +#include <emscripten/emscripten.h> +#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; } |