| Author |
SFX Question |
Boomer Ang
Joined: Mar 01, 2002 Posts: 653 | Posted: 2002-12-06 11:17  
Argh,argh,,
Translation is needed to reply
Boomer
 
|
Mike_R
Joined: Aug 04, 2002 Posts: 203 | Posted: 2002-12-06 19:28  
Here is how I do it, thanks to all for answers on Bitrate....
1). Open up golwave then open up SFX.agg file on these specific Hz range.
2). Bit rate choice choose 16 bit mono and then choose 8000-21000 hz rate. "I have found 21khz to be the best in less distortion".
3). I then copy that location from my start to my end length time and 1st save it as a new *.au file, then I reopen the au file in goldwave and save it as *.wav this time.
4). All editing is done in XP accessories under media/sound recorder which you are allowed to increase/decrease sound volume and mix and match 2 different wav files as one to include background chatter while still hearing the los angeles class internal sound.
5). I save that wav file as is now then open that wav file in goldwave and copy the *.wav back over the original time and length it was copied from.
The good thing about doing it from the original time and length is that it will be precise becuase you never changed time length.
SFX.agg file has time length of 1:21:05.539
mine by default is 154mb
I will keep trying diff Hz and report my findings.
_________________ http://www.geocities.com/mike22r2004/home.htm -Updated 01/21/03 new tutorials added
 
|
jsteed
Joined: Apr 08, 2002 Posts: 253 | Posted: 2002-12-07 10:55  
Hi Mike,
From your description, it sounds as if you do not copy out the header of the original wav file but only the actual data bytes. That is most likely your problem. The new sound file you make and insert into the .agg file, has the old wav header, but the characteristics of that file have been changed.
Try this; use Ludgers AggSplit to unpack the agg file. Note, it will only unpack the files that are in the first table of contents, (TOC). Hopefully, the file you are trying to modify will be one of these. Now compare the header of the unmodified file with the one that you have edited. If they are not the same and you are not copying the new header into the agg file, that is the problem.
I am currently writing a program to extract and replace the wav files. Below is the header structures of the .agg file. The only unknowns are the first 12 bytes of the wav file. Do you or anyone else know what these represent?
Cheers, jsteed
Aggregate file type (.agg)
Header: 0x1C(28) bytes
0x00 ASCII 'Aggregate V' + null byte
0x0D 11 bytes = 0
0x18 LONG Offset to table of contents
Table of contents header format: 0x10(16) bytes
0x00 LONG Offset to next TOC
0x04 LONG Size of TOC
0x08 LONG Max size of TOC = 3E80 (16,000) bytes
0x0C LONG number of entries in all the tables of content (2nd TOC does not have this)
Table of contents entry format: (variable length)
0x00 LONG length of name + null byte
0x04 LONG file length
0x08 LONG Time & date file added to .agg (Time_t) 3B5E00EE-3B5E0192 6:12pm - 6:15pm 7/24/01
0x0C LONG = 0
0x10 LONG = 0
0x14 LONG Offset to file start
0x18 File name, null terminated
Wav file header
RIFF header: 0x018(24) bytes
0x00 LONG ???
0x04 LONG = 0x2000(8192) ???
0x08 LONG = 0x2000(8192) ???
0x0C LONG Riff tag = "RIFF"
0x10 LONG Remaining number of bytes after this header
Wave header 0x04 bytes
0x14 LONG Wave tag = "WAVE"
Format header 0x18(24) bytes
0x18 LONG Format tag = "fmt "
0x1C LONG Chunk size = 0x10(16)
0x20 WORD Format tag (=1 no compression i.e. PCM format)
0x22 WORD number of channels
0x24 LONG Sample rate per sec
0x28 LONG Average bytes per sec = (Sample rate) * (Block Align)
0x2C WORD Block Align
0x3E WORD Bits per sec = 0x10(16)
Data header 0x8 bytes
0x30 LONG Data tag = "data"
0x34 LONG Data size
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-12-07 14:19  
Jsteed, are you going to be able to extract all the sound files that exist in the sfx.agg that will be cool.
The reason I ask is that I would like the ships and subs to have more unique sound signatures so to be able to add completely new ones would be a great thing.
_________________
Там за туманами, вечно пьяные мы...
XabbaRus' SeaStallion Site
SCX We
[ This Message was edited by: XabbaRus on 2002-12-07 14:21 ]
 
|
jsteed
Joined: Apr 08, 2002 Posts: 253 | Posted: 2002-12-07 23:02  
Hi Ben,
Yes, I can extract all the wav files. I am now writing the code to allow one to replace the existing files. They will have the same name as the originals, but their sounds can be completely different. After that, I will write the code to add new, additional sounds. The only thing that might be a problem in writing this last part, are those first 12 bytes at the beginning of the wav files. They are not a legitimate part of a wav header, so I suspect they may be internal information for SC.
Cheers, jsteed
 
|
Thomasew
Joined: Feb 28, 2002 Posts: 1898 From: Bluewater Bay, South Africa
| Posted: 2002-12-08 02:00  
Hi John
Sounds good. Well Done.
Cheers
Tom
_________________ He Who Will Not Risk Cannot Win
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-12-08 05:46  
jsteed you can always ask Sonalysts they will give you an answer.
the address is
computergames*sonalysts.com you know the deal with replace with a @ sign.
They should be able to tell you if those first 12 bytes is for internal SC code.
From correspondence I've had with them they are happy for us to make tools/mod the game as in their opinion it helps increase the shelf life of the game. So I don't think they will mind telling you this sort of stuff.
_________________
Project 971
 
|
ferenci
Joined: Apr 03, 2002 Posts: 283 From: Budapest, Hungary
| Posted: 2002-12-08 07:06  
Wow John, that sounds cool. If only we could add/replace sounds... that would change the "appereance" of the game.
Good luck!
_________________ "There are only two kinds of warships: submarines and targets."

 
|
jsteed
Joined: Apr 08, 2002 Posts: 253 | Posted: 2002-12-08 10:30  
Thanks for the kind words, all. I will try emailing SA for information on those 3 dwords. Hopefully it is not a trade secret.
Cheers, jsteed
 
|
|
jsteed
Joined: Apr 08, 2002 Posts: 253 | Posted: 2002-12-10 09:34  
I just received a reply from SA concerning those mysterious 12 bytes at the front of each wav file. Apparently their use is a state secret because they refuse to tell me what they are. So much for SA help.
Fortunately, a few minutes after I sent my inquiry to SA, I figured out what they represent. That's almost always the experience I have. So adding new wavs and replacing existing ones with differently sized wavs is not a problem.
I am changing the structure of the agg file. It was not well thought out in my opinion. From the tests I have run, the new agg file works just fine.
I still hope to have a first version ready by the end of the week. Would any of the SC web sites, MadCowz, Bill, etc. be willing to host it so anyone that wants to try it can just download it?
Cheers, jsteed
 
|
Madcowz
Joined: Feb 28, 2002 Posts: 574 From: Cambridge (UK)
| Posted: 2002-12-10 10:50  
Definately,
send it in.
Mad
_________________
Comsa
'When the hunter comes, the tiger runs with the deer'
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-12-10 12:16  
yes send it to me to at
benedict*kent5668.fsnet.co.uk
So what exactly did they say?
Some things they do hide but I can understand that..
_________________
Project 971
 
|
jsteed
Joined: Apr 08, 2002 Posts: 253 | Posted: 2002-12-10 15:02  
Hi Ben,
They said, "I'm sorry, but we have decided not to release that kind of information about Sub Command."
The 1st dword points 8192 bytes into the wav file. That's what came to me in a flash after I had emailed them. I assume that this point is used whenever SC wants to loop the sound, such as BB sound or engine sounds. I can't imagine why this would be a secret, but paranoia knows no bounds. In any case, by using this assumption, I can replace and add new files.
Cheers, jsteed
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-12-10 16:29  
I guess in the software and game dev industry you worry about that sort of stuff.
jsteed do you have debugviewer and the -debugoutput switch in your command line. That might help a lot in your understanding on how SC deals with calling sounds.
I've been seeing some odd things lately.
_________________
Project 971
 
|