SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
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
Old 08-05-23, 05:16 AM   #2
vickers03
Pooped from posting
 
Join Date: May 2007
Location: germany
Posts: 999
Downloads: 712
Uploads: 37


Default

thanks for the info and good work
vickers03 is offline   Reply With Quote
Old 08-05-23, 07:24 AM   #3
fitzcarraldo
Argentinian Skipper
 
fitzcarraldo's Avatar
 
Join Date: Jul 2009
Location: Somewhere between Buenos Aires and the Bungo Suido
Posts: 5,318
Downloads: 3346
Uploads: 0


Default

Good work!

Fitzcarraldo
__________________



My subject is War, and the pity of War. The Poetry is in the pity - Wilfred Owen.
fitzcarraldo is offline   Reply With Quote
Old 08-05-23, 05:23 PM   #4
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 10,100
Downloads: 451
Uploads: 2


Default

Good detective work. Those audio problems can be extremely tough to track down. CapnScurvy used to say "when in doubt, emulate Stock". That especially applies to the wav sound files. When adding a new file, find a similar existing use file, and copy it's bit-depth, resolution and channel count, and in the SH.sdl file, set it up as the similar existing set-up is there in the Stock game. Some sounds should not be over five seconds long. Some should not be over 15 seconds long, and others (mostly the "amb" sounds) can be quite long. If you are replacing a sound in an existing mod, it is best to copy the settings used for the file off of a similar use in the Stock game, just in case the original modder did not...
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.