lua-users home
lua-l archive

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


I am working on a sound library for lua (tentatively LuaSound).

The library i've ported (PortAudio) comes with a very nifty thread-safe ringbuffer, which i have built as a stand-alone userdata.

this buffer is filled by the lua app, and emptied by the sound thread (or vice-versa).

in one of my tests, i'm using

debug.sethook(writer,"",1e6)

to keep a 500 ms buffer topped up.

although i've yet to do performance tests, this appears to have negligable performance impact on lua.

any better ideas ? keep it simple please - i'll have time to debate the theory when i've finished the port, (and done some paying work too)

ps i'm planning to use libsndfile for sound file support, but it's LGPL, which may limit some people's use of it (please do NOT discuss that issue here).
 anyone know of or want to build a free library ?
(i just need to get the audio samples, anyoldhow).

Adrian