[OSC_dev] 4 Byte Padding
Angelo Fraietta
newsgroups at smartcontroller.com.au
Wed Jan 23 12:43:51 PST 2008
Sos in these instances, the data is being stored in the original OSC
message packet similar to storing a struct as a char buffer? So instead
of typecasting each data parameter, you are just getting the pointer to it?
If so, what happens when you go to 64 bit machines?
Adrian Freed wrote:
>>Why is the OSC messages and addresses padded to multiples of 4 Bytes
>
>
> For computational efficiency: data will be word aligned in memory of the sender and receiver this way. This means that a copy-free "pass by reference" is possible. This may seem irrelevant in occasional gesture messages but remember that OSC is used for moving multichannel audio and video streams and robot control sequences at Disneyland etc. The benefits are even observable in fast inner loops for oscillators and resonances controlled from OSC messages ......
>
> http://msdn2.microsoft.com/en-us/library/aa505951.aspx
>
> alignment like this has been a common feature of data formats, e.g.:
> http://www.martinreddy.net/gfx/2d/IFF.txt
> _______________________________________________
> OSC_dev mailing list
> OSC_dev at create.ucsb.edu
> http://lists.create.ucsb.edu/mailman/listinfo/osc_dev
>
>
>
--
Dr Angelo Fraietta
A.Eng, A.Mus.A, BA(Hons), Ph.D.
PO Box 859
Hamilton NSW 2303
Home Page
http://www.smartcontroller.com.au/
There are those who seek knowledge for the sake of knowledge - that is
CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
Bernard of Clairvaux (1090 - 1153)
More information about the OSC_dev
mailing list