Sound Driver Globals Asset

From COD Engine Research

The global sound drivers asset (snddriverglobals) is part of the D3DBSP system produced by Radiant, and has existed on every CoD game so far. Only 1 is loaded into memory at a time, and they control how sound reacts in different rooms, particularly for 5.1 channel systems. While it has remained mostly unchanged on Infinity Ward games, Treyarch has completely changed it.

Infinity Ward Games

struct XAUDIOREVERBSETTINGS
{
  unsigned int ReflectionsDelay;
  char ReverbDelay;
  char RearDelay;
  char PositionLeft;
  char PositionRight;
  char PositionMatrixLeft;
  char PositionMatrixRight;
  char EarlyDiffusion;
  char LateDiffusion;
  char LowEQGain;
  char LowEQCutoff;
  char HighEQGain;
  char HighEQCutoff;
  float RoomFilterFreq;
  float RoomFilterMain;
  float RoomFilterHF;
  float ReflectionsGain;
  float ReverbGain;
  float DecayTime;
  float Density;
  float RoomSize;
};

struct XaReverbSettings
{
  int presetOverridden;
  XAUDIOREVERBSETTINGS reverbSettings;
};

struct SndDriverGlobals
{
#ifdef XBOX
 #ifdef GHOSTS
  XaReverbSettings (*reverbSettings)[0x1C];
 #else
  XaReverbSettings (*reverbSettings)[0x1A];
 #endif
#endif
  const char *name;
#ifdef PS3
  float unknown;
#endif
};

World at War

struct SndDriverGlobals
{
  const char * name;
       char unknown[0x5C00];
};

Black Ops 1

struct SndGroup
{
  char unknown[0x48];
  int category;
  __int16 attenuationSp;
  __int16 attenuationMp;
};

struct SndCurve
{
  char unknown[0x24];
  float xy[8][2];
};

struct SndPan
{
  char unknown[0x24];
  float front;
  float back;
  float center;
  float lfe;
  float left;
  float right;
};

struct SndSnapshotGroup
{
  char unknown[0x24];
};

struct SndContext
{
  int type;
  int unknown;
  int values[8];
};

struct SndMaster
{
  char unknown[0x24];
  float notchE;
  float notchG;
  float notchF;
  float notchQ;
  float lowE;
  float lowG;
  float lowF;
  float lowQ;
  float peak1E;
  float peak1G;
  float peak1F;
  float peak1Q;
  float peak2E;
  float peak2G;
  float peak2F;
  float peak2Q;
  float hiE;
  float hiG;
  float hiF;
  float hiQ;
  float eqG;
  float compE;
  float compPG;
  float compMG;
  float compT;
  float compR;
  float compTA;
  float compTR;
  float limitE;
  float limitPG;
  float limitMG;
  float limitT;
  float limitR;
  float limitTA;
  float limitTR;
};

struct SndDriverGlobals
{
       const char * name;
       unsigned int groupCount;
       SndGroup * groups; //Size = ((groupCount << 2) + groupCount) << 4
       unsigned int curveCount;
       SndCurve * curves; //Size = curveCount * 0x64
       unsigned int panCount;
       SndPan * pans; //Size = panCount * 0x3C
       unsigned int snapshotGroupCount;
       SndSnapshotGroup * snapshotGroups; //Size = snapshotGroupCount << 5
       unsigned int contextCount;
       SndContext * contexts; //Size = ((contextCount << 2) + contextCount) << 3
       unsigned int masterCount;
       SndMaster * masters; //Size = masterCount * 0xB0
};

Black Ops 2

struct SndDriverGlobals
{
  const char * name;
       unsigned int groupCount;
       char * groups; //Size = ((groupCount << 2) + groupCount) << 4
       unsigned int curveCount;
       char * curves; //Size = curveCount * 0x64
       unsigned int panCount;
       char * pans; //Size = panCount * 0x3C
       unsigned int unknownCount1;
       char * unknown1; //Size = ((unknownCount1 << 3) + unknownCount1) << 2
       unsigned int unknownCount2;
       char * unknown2; //Size = ((unknownCount2 << 3) + unknownCount2) << 2
       unsigned int unknownCount3;
       char * unknown3; //Size = unknownCount3 * 0xF0
       unsigned int unknownCount4;
       char * unknown4; //Size = unknownCount4 * 0x3C
       unsigned int unknownCount5;
       char * unknown5; //Size = unknownCount5 * 0x64
};