View Single Post
Old 08-05-23, 02:50 AM   #1
Bartholomew Roberts
Bosun
 
Join Date: Sep 2021
Posts: 69
Downloads: 112
Uploads: 2
Default BRAKING DISCOVERY !!! 2 CHANNEL SOUND FX CAUSE 100% CTD!!!

It all begins as I was patching KSDII ctd bug of zooming in a group of sailors in SubPen. I thought it lacks the sound effect binding to the model.
https://www.subsim.com/radioroom/sho...34#post2878034



I found the model in Harbor_kit.dat with effort.



I delete the model, still ctd.

I delete the whole sub, still ctd.

Then I found a virtual node called SpeechKaleun in proximity.



I delete the node, solve the problem.

And that's not the end of it.

Why? Because I saw exact the same node in DW's file and that dose not cause CTD. So the problem is not the node itself, but something connecting to it.

So I opened the Harbor_kit.dsd and saw the node is connecting to KaleunSpeech.wav in Sound folder



Thus it must be the wav file causing the whole thing. I took a file called Fanfara_01.wav as a target for comparison since this is a 100% workable file I know. I made a mod rename the file to KaleunSpeech.wav and hear the music.

At first I thought of bit rate, Fanfara_01 has 300k/s while KaleunSpeech has over 1.6M/s, I downgrade the wav still CTD.

Then I guess it was the priority conflict as new sound are all classed as 128 so I changed it, still CTD.

I came to a stall, I played the two sounds file side by side thinking all the other possibilities.

Suddenly I had an idea, I opened the properties of both file and saw the difference.

The Fanfara_01.wav has 1 channel, the KaleunSpeech.wav is 2 channeled.

I convert the file to 1 channel and problem solved!

But, wait a moment, remember I said DW has the same node and sound file. If my logic is correct then why no ctd there?

I opened the properties of KaleunSpeech.wav in DW and guess what? It has only one channel ! Perfect.


Here is the conclusion.

Two channeled sound could be ambient background for interior, or could be binding directly to 3D object (whether it works still unclear), for radio ( I heard you could not save while playing it so better made 1 channel)

But in most cases, sound fx is binding to a virtual node as a point in the model or scene. If you use sound file with two channel in such places, you get 100% ctd within the max range of sound effect. Guess there could be no 2 channel from a single point so the game engine can not handle it.

That explains a lot of mysterious ctd like nearing port or under airstrike, siren and speech sound are 2 channel for some mods, and ctd connecting to enemy destroyer, Destroyer_hyd for some mods is 2 channel. Convert the file to one channel this problem could easily be fixed.

Now I can save and load near port without ctd.

Strongly suggest all modder check their sound fx files to make sure they are all 1 channel!

Last edited by Bartholomew Roberts; 08-05-23 at 07:05 AM.
Bartholomew Roberts is offline   Reply With Quote