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

Re: Update: Apple Game Server Online! v0.2



On Dec 18, 7:54 pm, David Schmidt <schmi...@my-deja.com> wrote:
> On 12/18/2011 8:47 PM, Egan Ford wrote:
>
> > [...]  Lastly I removed the CRC code in favor of a faster
> > checksum + file length check.
>
> I've been toying with ways to speed up the data stream of ADTPro... and
> the CRC is one place I think changes can be made.  What was your
> checksum algorithm - and did you do it over the entire file, or for
> segments of some size?

EOR.  Entire file.  Start with 0xFF and EOR every byte as it is read
in.  The new HIFI code has enough cycles when the sin wave is positive
to compute EOR checksum.  The data stream should end with a
precomputed checksum so that when the checksum EORs the checksum you
get 0.  That is the check.  Before that, I check that then last byte
ends where expected.  For audio traffic any disruption will always
change the length of the input.  It'd be almost impossible to still
have the data end where it should.  In that event, hopefully the
checksum will save me.