Spotlight: GTAGaming.com - Latest on GTA IV! | Forums | Files | Cheats | Hosting | Shop | Members | Gaming | Network 
 Welcome, Guest Viewer.
 Register at edgedatabase.com!

 30,075 Members. 0 Online, 4 Guests.
Deus Ex 2 :: Information :: Audio File Format Specifications :: SchemaMetafile_Harddrive
 

Contents

1. Introduction *)
2. Data Structures 
   2.1 Files
   2.2 Basic Types And Conventions
   2.3 String Type
   2.4 Offset Type
   2.5 SchemaMetafile_Harddrive.csc File Format
         2.5.1 File Format
         2.5.2 Sound Tags
         2.5.3 Tagged Sounds
         2.5.4 Mission Sounds
         2.5.5 Sound Information
   2.6 SchemaMetafile.csc File Format *)
3. Extracting/Inserting Sounds

Appendix A. Microsoft WAV File Format
Appendix B. DVI4/IMA ADPCM Audio Format
   B.1 The Deus Ex 2 Audio Format
   B.2 Decoding DVI4/IMA ADPCM
   B.3 Encoding DVI4/IMA ADPCM *)
Appendix C. Acknowledgements
*) Work in progress. Expect this to appear/improve in later revisions.

 

2.5.1 File Structure
General structure of the SchemaMetafile_Harddrive.csc file:

   struct SM_HarddriveFile
   {
      BYTE              aUnknown[13];           // Unknown data.
      SM_TagTable       Tags;                   // Table of all sound tags.                  
      SM_TaggedSounds   TSounds;                // Table of all sounds with tags, the 'tagged sounds'.
      SM_MissionSounds  MSounds;                // Table of all sounds without tags, the 'mission sounds'.
      SM_SoundInfoTable SoundInfo;              // Information about all sounds; filename, where to find it,
                                                // subtitles.
      BYTE              aData[];                // The Harddrive file contains a number of sounds itself.
   };

So, how does this work? In short: the TaggedSounds and MissionSounds contain an identifier and a reference into the SoundInfo table for every sound. The SoundInfo table tells where to find the audio data for a sound, including its size, its filename and its subtitle for different languages.

 

2.5.2 Sound Tags

What is a Sound Tag? What can be derived from the text in the sound tags and the combination of tags of the tagged sounds section, is that a sound tag is used as a property for a sound. It describes what or who uses the sound, in what situation the sound should be used etc.



The table:
   struct SM_TagTable
   {
      BYTE     nNumTags;
      SM_Tag   aTags[nNumTags];
   };

A sound tag and its subtags:

   struct SM_Tag
   { 
      SM_String strTagName;                     // All Tag names begin with '+'.  
      BYTE      ucData;                         // Unknown data.
      BYTE      nNumSubTags;                    // The number of SubTags for this SuperTag, can be 0.
      SM_String astrSubTagNames[nNumSubTags];   // All SubTags (only exists when nNumSubTags>0).
   };
 

2.5.3 Tagged Sounds

Tagged sounds are sounds with additional properties. They contain a combination of the various sound tags.

An example, consider the first tagged sound in the table.
- The subtitle for the sound is: "This is your last chance!".
- It has two tags: "+reprimandplayer.final" and "+voice.orderguardfemale1".
So, what we have here is:
- WHEN the sound should be used; reprimand the player one last time.
- WHO should use the sound; a female order guard type 1.

This system looks like it allows for an incredible powerful and efficient sound design. Very cool stuff! :)

The table:

   struct SM_TaggedSounds
   {
      WORD           nNumSounds;                // total number of tagged sounds.
      SM_TaggedSound aSounds[nNumSounds];       // the tagged sounds.
   };

A tagged sound:


   struct SM_TaggedSound
   {
      BYTE      nNumTags;                       // The number of tags for this sound.
      SM_TagRef aTagRefs[nNumTags];             // A table of the tags.
      SM_Offset Offset;                         // An offset into the SM_SoundInfoTable section of the file.
   };


Reference to a sound tag:

   struct SM_TagRef
   {
      BYTE  nTag;                               // Index of the Tag in the SM_TagTable.
      DWORD nSubTag;                            // Index of the SubTag of the corresponding Tag. *)
   };

*) An nSubTag member with value 0xFFFFFFFF indicates NO SUBTAG, it references the tag itself, not one of the subtags. A problem with this member is that a few tagged sounds have an nSubTag which is clearly out of range for the corresponding tag, so the current information regarding this is preliminary. Out of range tends to occur on sounds concerning material and movement properties.

 

2.5.4 Mission Sounds

Mission sounds are straightforward sounds with only a single string as an identifier. No sound tags.


The table:

   struct SM_MissionSounds
   {
      WORD nNumSounds;                          // total number of mission sounds.
      SM_MissionSound aSounds[nNumSounds];      // the mission sounds.
   };

A mission sound:

   struct SM_MissionSound
   {
      SM_String strID;                          // sound identifier string.
      SM_Offset Offset;                         // An offset into the SM_SoundInfoTable section of the file.
   };
 

2.5.5 Sound Information

The Sound Information tells Deus Ex 2 where to find the audio data. It is references by both the Tagged and the Mission Sounds. Note that a single Tagged/Mission Sound always refers to a single SM_SoundInfo. But, a SoundInfo can contain more than one sound!


The table:

   struct SM_SoundInfoTable
   {
      SM_SoundInfo aSounds[];
   };

The actual size of this table is unknown. Use the offset provided by the Tagged- and Mission Sounds to find the correct SM_SoundInfo.


Sound Information:

   struct SM_SoundInfo
   {
      BYTE              aUnknown[45];           // Unknown data.
      BYTE              nNumFiles;              // the number of sound files for this sound.
      SM_SoundFileInfo  aFileInfo[nNumFiles];   // sound file specific information.
   };

Sound File Information:

   struct SM_SoundFileInfo
   {
      SM_String  strFilename;             // Original filename.
      SM_Offset  Offset;                  // resourcefile id and offset into resourcefile. 1)
      DWORD      dwSizeWAV;               // Size (bytes) of WAV file in resourcefile. 2)
      DWORD      dwSizeOGG;               // Size (bytes) of OGG file in resourcefile. 2)
      DWORD      dwUnknown;               // Unknown data.            
      SM_String  strSubTitle_English;     // SubTitles in different languages.
      SM_String  strSubTitle_French;
      SM_String  strSubTitle_Italian;
      SM_String  strSubTitle_German;
      SM_String  strSubTitle_Spanish; 
   };

Notes:
1) The offset can be 0xFFFFFFFF to indicate there is NO sound. In that situation, both dwSizeWAV and dwSizeOGG are 0 and the strFilename is "none".
2) A sound is either a WAV or an OGG, so dwSizeWAV will be zero when it's an OGG and vice versa.

 

DEVELOPED ON ALIENWARE Proudly Sponsored by UGO Networks and Alienware Inc.
Copyright © 2000-2008 edgenetwork.org.  All Rights Reserved.
Generated in 0.03259s, 10 (100.59KB) Scripts, 5 SQL Queries (2.7%)