A lil' help, please
Posted: Sat Sep 23, 2006 1:42 am
Iwant to solve the communities audio problems, but I can't.
Fazek noted my mixer script that I'd posted as the most complicated thing here. Probably, I have a Much Better Version that's not quite so dunderheaded. You learn software design pretty fast when you're beat upside the head.
But what I need, really directly, is some assistance in linking LUA to outside DLL's. .SO's, whatever they use on Macs (never touch 'em). I'll use an example, and if you can help. YEAH!
My mixer script is pretty massive, and I've tried a lot of data structures to hold it (also just processing direct from files). It all sucks. The biggest problem is the fact that Lua, at it's core, does all math at double precosion float. The audio stuff is all a lot of short (2 byte) signed data, mad fast in C (or Pascal, which I thought of using, since I useta do a lot in that)I thought that beeing able to write a little pass a Lua string and do integer math on it cross platform library shouldn't be too hard to write.
Aw, hell. I've spent probably 2 solid days worth of my life trying to figure this out. C++ is, as the saying goes, greek to me. I'll learn how to code in it if I absolutely have to,but I don't think I'll ever like it. Whatever.
What I need is a neat way to pass a big Lua string (which would be the audio data) or several, to an external which can just do the giant piles of integer math which should take no time at all. Maybe I'm wierd, but I'd rather have a bridge between Lua and C, and then do everything that supposed to happen in the the in assembler code. I'm actually much more comfortable in that, though I'd prefer something that wasn't quite as nuts'n'bolts. But if I could work out a byte string/integermath/bytestring bit , as a lib accesible to Lua, I thinkl I could do most of the audio stuff thats been asked for thr last yearandahalf. And be happy to.
In th end, you have to pass it as Userdata, but I am 100% dumbfounded. I think I've read a good 50 of the Lua-Users wiki the last 3 weeks, and I still feel like I'm a stone cold idjit. Really, help me. I want to do cool stuff but I am at a stone cold impasse.
Fazek noted my mixer script that I'd posted as the most complicated thing here. Probably, I have a Much Better Version that's not quite so dunderheaded. You learn software design pretty fast when you're beat upside the head.
But what I need, really directly, is some assistance in linking LUA to outside DLL's. .SO's, whatever they use on Macs (never touch 'em). I'll use an example, and if you can help. YEAH!
My mixer script is pretty massive, and I've tried a lot of data structures to hold it (also just processing direct from files). It all sucks. The biggest problem is the fact that Lua, at it's core, does all math at double precosion float. The audio stuff is all a lot of short (2 byte) signed data, mad fast in C (or Pascal, which I thought of using, since I useta do a lot in that)I thought that beeing able to write a little pass a Lua string and do integer math on it cross platform library shouldn't be too hard to write.
Aw, hell. I've spent probably 2 solid days worth of my life trying to figure this out. C++ is, as the saying goes, greek to me. I'll learn how to code in it if I absolutely have to,but I don't think I'll ever like it. Whatever.
What I need is a neat way to pass a big Lua string (which would be the audio data) or several, to an external which can just do the giant piles of integer math which should take no time at all. Maybe I'm wierd, but I'd rather have a bridge between Lua and C, and then do everything that supposed to happen in the the in assembler code. I'm actually much more comfortable in that, though I'd prefer something that wasn't quite as nuts'n'bolts. But if I could work out a byte string/integermath/bytestring bit , as a lib accesible to Lua, I thinkl I could do most of the audio stuff thats been asked for thr last yearandahalf. And be happy to.
In th end, you have to pass it as Userdata, but I am 100% dumbfounded. I think I've read a good 50 of the Lua-Users wiki the last 3 weeks, and I still feel like I'm a stone cold idjit. Really, help me. I want to do cool stuff but I am at a stone cold impasse.