Main Site | Forum | Rules | Downloads | Wiki | Features | Podcast

NLSC Forum

Switch to full style
Talk about NBA 2K12 here.
Post a reply

Researching 2K12's audio format

Wed Aug 01, 2012 9:54 pm

2K has gone lengths to hide what the audio is encoded in, but by looking at the hex data I'm pretty sure that it's multiple audio parts, all encoded in 8-bit fixed-point, sampled at 44100Hz. This is consistent with previous iterations of the game, but it seems that the company has gone from 8-bit unsigned PCM to 8-bit fixed point, which seems that nor Audacity nor Adobe Audition have as available options for import.

The clue is a long
Code:
000000000000000000000000000000000000000000000000
hex which separates parts of jukeboxmusic.bin and appears 38 times in the file, along with a header of 32-bit unsigned integers similar to this one:
Code:
02000000 CD050000 0A000000 44AC0000 00C00600

The first 4 parts of the header are consistent (channels, ?, 10 (encoding type), 44100 sampling rate) and the last one I'm guessing is data length, since it's the only one that's changing.

If anyone with experience on the matter wants to help me with the research, be my guest.

Re: Researching 2K12's audio format

Wed Aug 01, 2012 10:47 pm

have you tried checking to see if the file is compressed with ZLib like the iff files? The editable 2K9 jukebox file was much larger than the uneditable 2k10+ ones

Re: Researching 2K12's audio format

Wed Aug 01, 2012 10:54 pm

zlib files have a signature in them, this one doesn't. And the decompressor throws an error if I try to unzlib it. I'll try to find my 2K9 disc to compare the jukeboxmusic.bin files, and compare the headers.

Re: Researching 2K12's audio format

Thu Aug 02, 2012 5:05 am

Imagine the possiblities! In-game commentary add-ons, custom music and arena sounds, player voices, etc...I really hope you guys are successful in this endeavor!

Re: Researching 2K12's audio format

Thu Aug 02, 2012 5:27 am

I did this a couple years ago when they first changed the format. I guess if I had programming experience I could have done something about it, because I have never heard of fixed point. I figured the 00's had something to do with how console's load blocks of data since they were consistent. However, I did hexedit some of the sound into different formatted sound files and was able to hear familiar sound, but not of the original quality that the game generates. I don't think it's just multiple audio parts, but entire songs and clips have these 00's between the data, from what I remember.

(enconding type) may actually be the bits.

Re: Researching 2K12's audio format

Thu Aug 02, 2012 10:54 am

When you say it might be the bits? There's no 10-bit encoding, as far as I know, and from the Wikipedia article on AU file formats, 10 corresponds to 8-bit fixed-point encoding, instead of the linear PCM 8-bit unsigned.

If this is right, it means each audio sample had a value of 0 to 255, and now has a value of 0.0 to 1.0. But something tells me it's not as simple as multiplying by 256, because the jukeboxmusic.bin file is orders smaller than the one in 2K9, which used Stereo 48000Hz audio. My guess is that since 2K10 (when the song and commentary quality deteriorated so that the game could still fit in a dual-layer DVD), the sample rate is not even 44100Hz, even though what can be mistaken as a header says so. I'd be guessing the sound is mono, and at an even lower sample rate, such as 22050Hz.

Or it could be just pretty much any other audio codec, and my research is nowhere near what the game is really doing.

The whole clue that got me to the AU format, is the fact that the game used to use raw PCM audio, and that the NBA2K12.exe has some "AUAUDIO" strings in it.

Unless we can try pretty much every raw encoding out there at every possible combination of sample rates and channels, I don't think we'll be finding something out.

They're not using something proprietary, that's all I can guess. One, I don't think 2K went as far as to create its own audio codec, and two, they haven't licensed ANY audio technology, because otherwise it would be credited in the Readme or the Manual and in the bootup sequence (just like Bink, Fraunhofer IIS (for MP3), and others).

Re: Researching 2K12's audio format

Thu Aug 02, 2012 3:29 pm

You rang a bell in my head. I think I remember a codec with AU or something with LAW in it where I could hear the music after hex editing.

Re: Researching 2K12's audio format

Thu Aug 02, 2012 7:36 pm

μ-LAW and α-LAW are both AU encodings, but I think I tried them and didn't hear anything. If you manage to remember, hit me up.

Re: Researching 2K12's audio format

Thu Aug 02, 2012 9:00 pm

I copied and pasted zeroes as well, I think. basically, I converted a song in virtual dub to every codec and format that made sense. then hex edited a large chunk of the jukebox file into it, opened in a wave editor, tried different players with different results. some don't open, some skip the hex part, others play static or even stop right at the spot. I tried as many players as I could. Vlc, winamp, wmp, mpc, sound player, etc.

Re: Researching 2K12's audio format

Thu Aug 02, 2012 9:06 pm

Remember what you did exactly to hear familiar sounds, even not at the in-game quality? What encoding, what settings, what program you were using that actually got you to hear some audio?

Re: Researching 2K12's audio format

Fri Aug 03, 2012 4:17 am

I'll just try to recreate what I did, because I deleted all the files a few months ago while trimming computer files.
Post a reply