Offtopic: Into Commodore 64 (6502) coding, pixeling or music?
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!

Forum rules: Click here

Compressed wave file?

Get help on any and all audio formats, or chip in and help others!
Post Reply
simple
beginner
Posts: 25
Joined: Fri Sep 28, 2007 11:52 pm
Has thanked: 7 times

Compressed wave file?

Post by simple » Wed Oct 07, 2009 4:48 pm

Hi,

I have had some trouble playing some wave files, I can hear the music but there are also noise and static-ish within the music as well... The file was extracted from an iPhone IPA application...

Any one have any idea?...I have also upload the sample file if anyone can help me out...

XAC_ADVANCED_MSTR.wav (976.14 KB)

If you have trouble with the link above try this one instead...
Last edited by simple on Wed Oct 21, 2009 7:21 pm, edited 1 time in total.

hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 73 times
Contact:

Re: Compressed wave file

Post by hcs » Sun Oct 18, 2009 10:44 pm

Pretty weird, everything seems to obey the general form of MS IMA, but the indexes aren't in the normal 0 to 88 range of IMA: the second frame has 0xB3 for the right channel, and the fourth frame has 0xA3 for the left and 0x64 for the right. So it seems that whatever ADPCM is in use here isn't exactly IMA. Don't know how to approach it beyond that, I don't think the iPhone has anything but IMA built in, so it's probably in software; if you want I might look at the executable and see if I can spot the decoder.

---
Ah, figured it out. It is normal MS IMA, however *all* bytes in the stream are nibble reversed.

---
Here's a little program to reverse the whole data chunk of a RIFF WAVE:
http://hcs64.com/files/ipa_reverse_nibbles00.zip
makes your file playable.

simple
beginner
Posts: 25
Joined: Fri Sep 28, 2007 11:52 pm
Has thanked: 7 times

Re: Compressed wave file

Post by simple » Mon Oct 19, 2009 7:10 am

Thanks hcs. :D

All the waves come out playable after going through the convertor.
:)


EDIT: I just realized this particular file doesn't work after going through the convertor...

Can you help me check again what's wrong?...

http://www.slingfile.com/file/228190-hiLY5PMQlx.html

Thanks again hcs :D

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Re: Compressed wave file?

Post by Mr.Mouse » Thu Oct 22, 2009 7:17 pm

Nice work hcs! :D

hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 73 times
Contact:

Re: Compressed wave file?

Post by hcs » Fri Oct 23, 2009 3:35 am

oops, didn't realize that it was posted out here, I already gave simple the little utility for that file (MPEG 1 layer 3 with all but first 4 bytes nibble-swapped) to simple via PM, here it is for anyone else:
http://hcs64.com/files/mpeg_reverse_nibbles00.zip
Despite the name it doesn't know anything about MPEG, just reverses all but first 4 bytes.

Post Reply