data. On closer inspection (should have done that before, sorry), the procedure uninterleave that you gave is a direct translation of that code, and it also uses little endian (the high byte is at address i*4+1, the low byte at i*4, hence the little byte first, little endian). Procedure uninterleave_little_endian uninterleaves as well, but assumes that the machine it's running on is little endian, so it can get away with casting two bytes to a 16-bit integer, assuming that the input is little endian. The "official" encoder example must work on big endian as well as little endian machines, so it can't use the second trick. Delphi only works on x86 anyway, so you may as well use the faster version with casts. Conclusion, your input file is little endian. Since you're running on an x86 machine, both procedures are equivalent. If you would compile and run your code on a big endian machine with the same little-endian file, the procedure uninterleave would give correct results, procedure uninterleave_little_endian would not. HTH, Lourens -- GPG public key: http://home.student.utwente.nl/l.e.veen/lourens.key --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.