lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Daurnimator wrote:
Looks like luaL_register should be replaced here with luaL_newlib
Examples should then be rewritten to do: local ao = require "ao"

Thanks for that; this compiles just fine:

#if LUA_VERSION_NUM >= 502
    luaL_newlib(L, ao);    /* 5.2 */
#else
    luaL_register(L, "ao", ao);  /* 5.1 */
#endif

Unfortunately, I still can't get the example script to work
well :-( It produces half a second of loud noise,
then half a second of sine-wave with a glitch in the middle.
And attempts to output more than one second segfault.
I'll wrestle with it a bit...

Thanks again,  Peter Billam

http://www.pjb.com.au     pjb@pjb.com.au     (03) 6278 9410
"Follow the charge, not the particle."  --  Richard Feynman
 from The Theory of Positrons, Physical Review, 1949