For general and site related discussion.
Moderators: XtC , BuZz
asle
Posts: 208 Joined: Fri Mar 07, 2003 11:28 pm
Location: France
Contact:
Post
by asle » Mon Mar 24, 2003 4:11 pm
Hey XtC,
Do you have a similar description on how to depack P60a and P61a samples ?. Would be Very cool
. err .. C example only as that's the only thing I'm able to read
.
Thanks,
Regards,
Sylvain
Sylvain "Asle" Chipaux
XtC
Posts: 628 Joined: Wed Jun 12, 2002 6:26 pm
Location: Rossendale, England
Contact:
Post
by XtC » Mon Mar 24, 2003 4:23 pm
I think it's Kyz(er) who you should be asking.
I wouldn't know how to decompress in an oxygen chamber, never mind unpack a delta compressed sample file!
asle
Posts: 208 Joined: Fri Mar 07, 2003 11:28 pm
Location: France
Contact:
Post
by asle » Mon Mar 24, 2003 5:16 pm
ah .. hum, well, Kyz ?
Sylvain
Sylvain "Asle" Chipaux
kyz
Posts: 126 Joined: Thu Nov 14, 2002 1:58 am
Location: Edinburgh, Scotland
Contact:
Post
by kyz » Mon Mar 24, 2003 5:49 pm
asle wrote: ah .. hum, well, Kyz ?
Sylvain
P50 / P60 / P61's delta-4 coding is as follows:
Code: Select all
BYTE *src, *dest, *src_end, samp;
BYTE table[16] = {0,1,2,4,8,16,32,64,128,-64,-32,-16,-8,-4,-2,-1}
for (samp = 0; src < src_end; src++) {
samp -= table[(*src >> 4) & 0x0F]; *dest++ = samp;
samp -= table[ *src & 0x0F]; *dest++ = samp;
}