diff --git a/main.c b/main.c index cbae3ad..eeec118 100644 --- a/main.c +++ b/main.c @@ -176,6 +176,16 @@ int main(int argc, char **argv) { if(!lua_isnumber(L, -1)) return 2; int center_module = lua_tointeger(L, -1); + // export some global constants + lua_pushnumber(L, SAMPLE_RATE); + lua_setglobal(L, "SAMPLE_RATE"); + + lua_pushnumber(L, BLOCK_LEN); + lua_setglobal(L, "BLOCK_LEN"); + + lua_pushnumber(L, DATALEN); + lua_setglobal(L, "DATALEN"); + // allocate arrays red = malloc(num_modules * sizeof(double)); green = malloc(num_modules * sizeof(double));