Sound Driver Globals Asset: Difference between revisions

From COD Engine Research
Line 170: Line 170:
== Black Ops 2 ==
== Black Ops 2 ==
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
struct SndGroup
enum SndMenuCategory
{
{
char name[0x20];
  SND_CATEGORY_SFX = 0x0,
char parent[0x20];
  SND_CATEGORY_MUSIC = 0x1,
int nameHash;
  SND_CATEGORY_VOICE = 0x2,
int unknown;
  SND_CATEGORY_UI = 0x3,
int category;
  SND_CATEGORY_CINEMATIC = 0x4,
short attenuationSp;
  SND_CATEGORY_COUNT = 0x5,
short attenuationMp;
};
 
struct SndVolumeGroup
{
  char name[0x20];
  char parentName[0x20];
  unsigned int id;
  int parentIndex;
  SndMenuCategory category;
  unsigned __int16 attenuationSp;
  unsigned __int16 attenuationMp;
};
};


Line 184: Line 194:
{
{
char name[0x20];
char name[0x20];
int nameHash;
unsigned int id;
vec2_t xy[8];
vec2_t points[8];
};
};


Line 191: Line 201:
{
{
char name[0x20];
char name[0x20];
unsigned int nameHash;
unsigned int id;
float front;
float front;
float back;
float back;
Line 202: Line 212:
struct SndDuckGroup // 0x24
struct SndDuckGroup // 0x24
{
{
char name[0x20];
  char name[32];
int nameHash;
  unsigned int id;
};
};


struct SndMaster
struct SndMaster
{
{
char name[0x20];
  char name[0x20];
int nameHash;
  unsigned int id;
float lowE;
  int lowE;
float lowG;
  float lowG;
float lowF;
  float lowF;
float lowQ;
  float lowQ;
float peak1E;
  int peak1E;
float peak1G;
  float peak1G;
float peak1F;
  float peak1F;
float peak1Q;
  float peak1Q;
float peak2E;
  int peak2E;
float peak2G;
  float peak2G;
float peak2F;
  float peak2F;
float peak2Q;
  float peak2Q;
float hiE;
  int hiE;
float hiG;
  float hiG;
float hiF;
  float hiF;
float hiQ;
  float hiQ;
float eqG;
  float eqG;
float compE;
  int compE;
float compPG;
  float compPG;
float compMG;
  float compMG;
float compT;
  float compT;
float compR;
  float compR;
float compTA;
  float compTA;
float compTR;
  float compTR;
float limitE;
  int limitE;
float limitPG;
  float limitPG;
float limitMG;
  float limitMG;
float limitT;
  float limitT;
float limitR;
  float limitR;
float limitTA;
  float limitTA;
float limitTR;
  float limitTR;
float busReverbG;
  float busReverbG;
float busFxG;
  float busFxG;
float busVoiceG;
  float busVoiceG;
float busPfutzG;
  float busPfutzG;
float busHdrfxG;
  float busHdrfxG;
float busUiG;
  float busUiG;
float busMusicG;
  float busMusicG;
float busMovieG;
  float busMovieG;
float busVcsG;
  float busVcsG;
float busReverbE;
  int busReverbE;
float busFxE;
  int busFxE;
float busVoiceE;
  int busVoiceE;
float busPfutzE;
  int busPfutzE;
float busHdrfxE;
  int busHdrfxE;
float busUiE;
  int busUiE;
float busMusicE;
  int busMusicE;
float busMovieE;
  int busMovieE;
float hdrFxCompE;
  int hdrfxCompE;
float voiceEqE;
  int voiceEqE;
float voiceCompE;
  int voiceCompE;
};
};


Line 269: Line 279:
};
};


struct SndVoiceDuck // 0x3C
struct SndSidechainDuck
{
{
char name[0x20];
  char name[32];
int nameHash;
  unsigned int id;
float G;
  float g;
float F;
  float f;
float Q;
  float q;
float TF;
  float ta;
float TA;
  float tr;
float TR;
  float tf;
};
};


struct SndUnknown
struct SndFutz
{
{
char name[0x20];
  char name[0x20];
int name;
  unsigned int id;
float BpfF;
  float bpfF;
float BpfQ;
  float bpfQ;
float LsG;
  float lsG;
float LsF;
  float lsF;
float LsQ
  float lsQ;
float distortion;
  float dist;
float PreG;
  float preG;
float PostG;
  float postG;
float TH;
  float th;
float TG;
  float tg;
float ClipPre;
  float clippre;
float ClipPost;
  float clippost;
float Blend;
  float blend;
float StartAlias;
  unsigned int startAliasId;
float StopAlias;
  unsigned int stopAliasId;
float LoopAlias;
  unsigned int loopAliasId;
};
};


Line 307: Line 317:
const char * name;
const char * name;
unsigned int groupCount;
unsigned int groupCount;
SndGroup * groups; //Size = groupCount * 0x50
SndVolumeGroup * groups; //Size = groupCount * 0x50
unsigned int curveCount;
unsigned int curveCount;
SndCurve * curves; //Size = curveCount * 0x64
SndCurve * curves; //Size = curveCount * 0x64
Line 319: Line 329:
SndMaster * masters; //Size = unknownCount3 * 0xF0
SndMaster * masters; //Size = unknownCount3 * 0xF0
unsigned int voiceDuckCount;
unsigned int voiceDuckCount;
SndVoiceDuck * voiceDucks; //Size = unknownCount4 * 0x3C
SndSidechainDuck *voiceDucks;
unsigned int unknownCount5;
unsigned int futzCount;
SndUnknown * unknown5; //Size = unknownCount5 * 0x64
SndFutz *futzes;
};
};
</syntaxhighlight>
</syntaxhighlight>

Revision as of 01:07, 21 December 2014

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 name[0x20];
  char parent[0x20];
  unsigned int nameHash;
  int unknown2;
  int category;
  short attenuationSp;
  short attenuationMp;
};

struct SndCurve
{
  char name[0x20];
  unsigned int nameHash;
  vec2_t xy[8];
};

struct SndPan
{
  char name[0x20];
  unsigned int nameHash;
  float front;
  float back;
  float center;
  float lfe;
  float left;
  float right;
};

struct SndSnapshotGroup
{
  char name[0x20];
};

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

struct SndMaster
{
  char name[0x20];
  unsigned int nameHash;
  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

enum SndMenuCategory
{
  SND_CATEGORY_SFX = 0x0,
  SND_CATEGORY_MUSIC = 0x1,
  SND_CATEGORY_VOICE = 0x2,
  SND_CATEGORY_UI = 0x3,
  SND_CATEGORY_CINEMATIC = 0x4,
  SND_CATEGORY_COUNT = 0x5,
};

struct SndVolumeGroup
{
  char name[0x20];
  char parentName[0x20];
  unsigned int id;
  int parentIndex;
  SndMenuCategory category;
  unsigned __int16 attenuationSp;
  unsigned __int16 attenuationMp;
};

struct SndCurve
{
	char name[0x20];
	unsigned int id;
	vec2_t points[8];
};

struct SndPan
{
	char name[0x20];
	unsigned int id;
	float front;
	float back;
	float center;
	float lfe;
	float left;
	float right;
};

struct SndDuckGroup	// 0x24
{
  char name[32];
  unsigned int id;
};

struct SndMaster
{
  char name[0x20];
  unsigned int id;
  int lowE;
  float lowG;
  float lowF;
  float lowQ;
  int peak1E;
  float peak1G;
  float peak1F;
  float peak1Q;
  int peak2E;
  float peak2G;
  float peak2F;
  float peak2Q;
  int hiE;
  float hiG;
  float hiF;
  float hiQ;
  float eqG;
  int compE;
  float compPG;
  float compMG;
  float compT;
  float compR;
  float compTA;
  float compTR;
  int limitE;
  float limitPG;
  float limitMG;
  float limitT;
  float limitR;
  float limitTA;
  float limitTR;
  float busReverbG;
  float busFxG;
  float busVoiceG;
  float busPfutzG;
  float busHdrfxG;
  float busUiG;
  float busMusicG;
  float busMovieG;
  float busVcsG;
  int busReverbE;
  int busFxE;
  int busVoiceE;
  int busPfutzE;
  int busHdrfxE;
  int busUiE;
  int busMusicE;
  int busMovieE;
  int hdrfxCompE;
  int voiceEqE;
  int voiceCompE;
};

struct SndContext
{
	int type;
	int value[8];
};

struct SndSidechainDuck
{
  char name[32];
  unsigned int id;
  float g;
  float f;
  float q;
  float ta;
  float tr;
  float tf;
};

struct SndFutz
{
  char name[0x20];
  unsigned int id;
  float bpfF;
  float bpfQ;
  float lsG;
  float lsF;
  float lsQ;
  float dist;
  float preG;
  float postG;
  float th;
  float tg;
  float clippre;
  float clippost;
  float blend;
  unsigned int startAliasId;
  unsigned int stopAliasId;
  unsigned int loopAliasId;
};

struct SndDriverGlobals
{
	const char * name;
	unsigned int groupCount;
	SndVolumeGroup * groups; //Size = groupCount * 0x50
	unsigned int curveCount;
	SndCurve * curves; //Size = curveCount * 0x64
	unsigned int panCount;
	SndPan * pans; //Size = panCount * 0x3C
	unsigned int duckGroupCount;
	SndDuckGroup * duckGroups; //Size = unknownCount1 * 0x24
	unsigned int contextCount;
	SndContext * contexts; //Size = unknownCount2 * 0x24
	unsigned int masterCount;
	SndMaster * masters; //Size = unknownCount3 * 0xF0
	unsigned int voiceDuckCount;
	SndSidechainDuck *voiceDucks;
	unsigned int futzCount;
	SndFutz *futzes;
};