DavDecoder - Convert between Dav and Wav

A new and more complex sound system is now available, here's the place to discuss some of its finer points and learn how to create new sets of sounds.

Moderator: Moderators

Locked
SteelixB
Very Active Forum Member
Posts: 1058
Joined: Mon Dec 10, 2001 12:00 am
Location: Newcastle
Contact:

DavDecoder - Convert between Dav and Wav

Post by SteelixB »

Quick program I wrote to convert Dav files back into Wav files.

The Dav format is unbelievably simple... it's just the Wav format with every byte in the file XORd with 0x7B (123). This program will therefore convert a Dav file into its exact original Wav format. I really can't see any reason why someone decided to encode Wav files like this...

Use this instead of importing into GoldWave - you WILL NOT get the exact wav file by using GoldWave

 Click to view more informationDavDecoder [9059 bytes] - DavDecoder.zip
File ID: 18204 Date: 11 Jan 2008 - 4090 Downloads


ALSO:

If you want to encode a wav file back into dav, you can put the wav file as the input (although I did not setup the file open / save dialogs to handle reversed extensions, but you can change the filename in the text box), and the output file will be encoded as dav.

The alternative way of encoding a wav file to dav is to use the blueprint editor to convert the file.
Last edited by SteelixB on Sun Feb 03, 2008 12:21 pm, edited 3 times in total.
New username: RSBen
User avatar
phat2003uk
SWTVR Assistant Manager
Posts: 7447
Joined: Thu Aug 08, 2002 5:52 pm

Re: DavDecoder

Post by phat2003uk »

Thanks for this Ben. Useful for listening to the .dav files properly. No need to make .dav files though seeing as RS can use .wav files too :). I heard they made into .dav to be protected (which obviously hasn't worked too well) ;).
SteelixB
Very Active Forum Member
Posts: 1058
Joined: Mon Dec 10, 2001 12:00 am
Location: Newcastle
Contact:

Re: DavDecoder

Post by SteelixB »

phat2003uk wrote:Thanks for this Ben. Useful for listening to the .dav files properly. No need to make .dav files though seeing as RS can use .wav files too :). I heard they made into .dav to be protected (which obviously hasn't worked too well) ;).
Honestly, after I realised (after about 10 minutes comparing a source file to a converted file) what the difference was, I figured that it shouldn't be even called 'protection' if it's that easy to decode. It's literally like replacing characters of the alphabet with another character a few letters along, and when you reach the end of the alphabet, you replace with characters at the beginning - they had better encryption than this in world war II...
New username: RSBen
User avatar
RiscaStation
Very Active Forum Member
Posts: 1466
Joined: Fri Feb 24, 2006 7:52 pm
Location: Newport, South wales

Re: DavDecoder

Post by RiscaStation »

Hi
Having read the above on "Dav" files and "Wav" files, is it possible to use sound files, used in "MSTS", in "Rail simulator" as replacements using your decoder?

Best regards

Mike
User avatar
tads1970
Very Active Forum Member
Posts: 1435
Joined: Tue May 23, 2006 8:54 pm
Location: Newcastle Upon Tyne England

Re: DavDecoder

Post by tads1970 »

Credit where credit is due,let me buy this man a drink :wink: ,Outstanding Ben,been waiting for something like this for EARS from the start.
I hope to hear sounds like Modern coach sounds,flange squeel,UK SWB sounds-all available for MSTS,it would make RS much better.

Thank You

Daz
SteelixB
Very Active Forum Member
Posts: 1058
Joined: Mon Dec 10, 2001 12:00 am
Location: Newcastle
Contact:

Re: DavDecoder

Post by SteelixB »

It was one of the first things I started working on.. however I didn't know that it was meant to be a 'protected' format, so gave up, until I realised I needed to make sounds for the 158. In which case, I decided to listen to default sounds to see if they could be used in some way (remember, this is going to be payware under Making Tracks, so I can't just use any old sounds). I then took a sound, and converted it to dav using the blueprint editor, and then compared the files. Finding not a single bit of data from the wav file in the dav, i noticed a pattern of bytes very similar in shape to the wav... I then tried working out the difference... thinking at first maybe a set value was added to each byte... nope. I then tried comparing the bits of the byte, to find that each byte had actually been XOR'd by 0x7B. Then it suddenly hit me that I should definitely write a program to convert them, and release it.

I can't remember the sound format of MSTS, but it should be perfectly possible to use MSTS sounds in RS.
New username: RSBen
User avatar
phat2003uk
SWTVR Assistant Manager
Posts: 7447
Joined: Thu Aug 08, 2002 5:52 pm

Re: DavDecoder

Post by phat2003uk »

RiscaStation wrote:Hi
Having read the above on "Dav" files and "Wav" files, is it possible to use sound files, used in "MSTS", in "Rail simulator" as replacements using your decoder?

Best regards

Mike
Yes but unfortunately MSTS sounds are of quite poor quality compared to what KRS can use. Not to say it can't be done. Also, the decoder is only needed to listen to the default files, .dav files are not required for new sound sets, .wav can be used.
Locked

Return to “[RS] Sounds”