Search found 70 matches

by MachineCode
Sat Oct 01, 2016 11:05 am
Forum: General
Topic: Post-0.10.0 feature wishlist
Replies: 177
Views: 91679

Re: Post-0.10.0 feature wishlist

"You will wind up copying same amount of data while doing more work and losing LUA-table convenience. I don't see the benefit." If you are dealing with bulk data which is in bytes the overhead of putting it in tables is high. The worker thread may be doing something like reading bytes and ...
by MachineCode
Sat Oct 01, 2016 5:07 am
Forum: General
Topic: Post-0.10.0 feature wishlist
Replies: 177
Views: 91679

Re: Post-0.10.0 feature wishlist

Maybe I am missing something here - I am not suggesting a change to Lua, but a new framework data object similar to imageData, that makes threads much more versatile for various data operations where copying data via channels would be non optimal. I know FFI can do this already, as you say, but it i...
by MachineCode
Sat Oct 01, 2016 2:45 am
Forum: General
Topic: Post-0.10.0 feature wishlist
Replies: 177
Views: 91679

Re: Post-0.10.0 feature wishlist

I was think some more about how you could use a data object like this, and it occurred to me that the ability to insert and extract data via strings - string = ArrayData:getstr(byte_index, str_size) ArrayData:putstr(byte_index, string) is an extremely useful tool for managing data coherence across m...
by MachineCode
Fri Sep 30, 2016 8:08 am
Forum: General
Topic: Post-0.10.0 feature wishlist
Replies: 177
Views: 91679

Re: Post-0.10.0 feature wishlist

Hi Love2d with ZeroBrane has become my favourite programming tool and it gets better each release. I wrote some code that uses the threads and channels to communicate. The ImageData object is very useful as it lets you efficiently do work on the bitmap and then handle the update to screen in the mai...
by MachineCode
Sat Apr 02, 2016 11:55 am
Forum: Support and Development
Topic: How to serialize/deserialize a SoundData object?
Replies: 16
Views: 6118

Re: How to serialize/deserialize a SoundData object?

Also, when you say log compression on string encoding, do you mean compressing 16bit samplepoints into 8 bits? how would you get back the original 16bit fidelity though? I don't think it can be anything but lossless. Telephony log-compression like mu and a-law, like i wrote before, sacrifice enough...
by MachineCode
Fri Apr 01, 2016 11:58 pm
Forum: Support and Development
Topic: How to serialize/deserialize a SoundData object?
Replies: 16
Views: 6118

Re: How to serialize/deserialize a SoundData object?

OK that sounds promising. I assume that data object you get from Data:getPointer is a byte array or short array depending on the bits parameter when the soundData was created? If you can efficiently fill a soundData from a string, it might be possible to squeeze a bit more from 8 bit by doing some l...
by MachineCode
Fri Apr 01, 2016 10:36 am
Forum: Support and Development
Topic: How to serialize/deserialize a SoundData object?
Replies: 16
Views: 6118

Re: How to serialize/deserialize a SoundData object?

I will try a few of these ideas and see how they go. For 8 bit sounds it is possible to represent a sound buffer as a string. It might be possible to have a version of newSoundData that accepts a string as a parameter and initializes the sound data to that. 16 bit sound could be byte pairs in a stri...
by MachineCode
Thu Mar 31, 2016 12:49 pm
Forum: Support and Development
Topic: How to serialize/deserialize a SoundData object?
Replies: 16
Views: 6118

Re: How to serialize/deserialize a SoundData object?

Ok - thanks for that. If I use getString on a soundData object (which I could have loaded or synthesized), how do I reconstruct a soundData from this string? Looking on the wiki I can't see the inverse - or are you saying that the soundData:getstring returns a string that can be turned into a file w...
by MachineCode
Thu Mar 31, 2016 12:38 am
Forum: Support and Development
Topic: How to serialize/deserialize a SoundData object?
Replies: 16
Views: 6118

How to serialize/deserialize a SoundData object?

I want to have a whole lot of short sounds stored in a db or passed around via network sockets. This would need something like binser or bitser to serialize them from a SoundData object after loading or creating them, then restore the SoundData object later on. Is this easy to to do, or has someone ...
by MachineCode
Mon Mar 28, 2016 11:09 am
Forum: General
Topic: I am an unfortunate victim of perfectionism.
Replies: 13
Views: 7280

Re: I am an unfortunate victim of perfectionism.

Part of the problem may be that the design process is probably a steeper learning curve that actual programming. If anyone sits down at their computer and starts trying to design a big project like a game, they will almost certainly run off the rails. It is just too big a job to succeed at with just...