Question about audio

mtm2 and other sensible chat
Post Reply
wiesshund
Member
Posts: 26
Joined: Wed Jul 15, 2020 9:42 pm

Question about audio

Post by wiesshund »

Fila since you have the source code, maybe you might know

The games audio files, though having the wav extension, are not wave files
I know they are raw (and it plays back WAV compressed audio with much lower volume to boot)
Do you know what raw format they are in?

it does appear to be 16bit
and i am suspecting it is the now defunct MS ADPCM raw, they made and used that a lot back in the day

If it is that, do you know of an existing codec for it?

I was tinkering around with the engine sounds for giggles
and it only plays raw 16bit PCM 22k sort of close to correct, but not exactly, actually it is terrible
but if i manipulate the DC offset it is less terrible but still not remotely correct, Speed it correct, and it is recognizable but it still sounds like garbage, it is not standard PCM that they are using in the games sound engine from what i can determine.

Their wave forms also are heavily biased
No wave form below -0.3 ish which is a pretty heavy DC offset
Entire bottom of the wave form is flattened out.
Like nothing below around -0.3

the game will play a standard wav file, but it does not play it correct and the volume is kinda not there
Which makes sense if the game is actually looking for and using that heavy DC offset for something
User avatar
Fila
Member
Posts: 1452
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Question about audio

Post by Fila »

Ugh... not sure how to answer that because they're source code uses a sound engine called KASE. I haven't found anything whether it was a standardized sound engine or whether they built it from scratch.

In terms of songs, it accepts .wav or .mod files only.

There is a lot of written code by them mixing the sound volumes in weird ways.
User avatar
Slayer
Member
Posts: 1822
Joined: Sun Oct 16, 2005 4:39 pm
Location: Winnipeg Manitoba, Canada

Re: Question about audio

Post by Slayer »

I thought the game needed 8bit mono wave files?
Image
wiesshund
Member
Posts: 26
Joined: Wed Jul 15, 2020 9:42 pm

Re: Question about audio

Post by wiesshund »

Slayer wrote:I thought the game needed 8bit mono wave files?
for the sound effects, engine etc, if you extract those from the pod
though they have the .wav extension, the do not appear to be an actual WAV file

They appear to be some kind of 16bit raw wave form
I suspect 16bit 22k mono MS-ADPCM big endian, and they are heavily DC biased
You will see what i mean,if you import one into something like audacity.
export one of the idle or accel sounds, those are the engine

I have tried every tool i have but can not analyze and determine the exact raw wave format

The game will play back an 8k mono WAV file if you put one in as a replacement
but it does not play it back in the same manner as the stock raw files, for one volume is much reduced
Fila wrote:
There is a lot of written code by them mixing the sound volumes in weird ways.
That does not surprise me given that they are using very oddly manipulated raw wave forms for the sound effects
No one DC biased like that by accident
User avatar
Fila
Member
Posts: 1452
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Question about audio

Post by Fila »

Yeah I can't find anything that is easily identifiable as to what codec they were using. But sure as heck there's like 200 lines of code for how to mix the volumes of the songs. lol
Post Reply