Difference between revisions of "Sound Driver Globals Asset"

From COD Engine Research
Jump to: navigation, search
m (Black Ops 2)
(Infinity Ward Games)
Line 39: Line 39:
 
{
 
{
 
   int presetOverridden;
 
   int presetOverridden;
 +
#ifdef IW6
 +
  XAUDIO2FX_REVERB_I3DL2_PARAMETERS reverbSettings;//Located in xaudio2fx.h which is included in the 360SDK
 +
#else
 
   XAUDIOREVERBSETTINGS reverbSettings;
 
   XAUDIOREVERBSETTINGS reverbSettings;
 +
#endif
 +
};
 +
 +
struct SndGlobalSettings_t
 +
{
 +
  float globalVolumeModifier;
 
};
 
};
  
 
struct SndDriverGlobals
 
struct SndDriverGlobals
 
{
 
{
 +
  const char *name;
 +
#ifdef IW6
 +
  SndGlobalSettings_t settings;
 +
#endif
 
#ifdef XBOX
 
#ifdef XBOX
#ifdef GHOSTS
 
  XaReverbSettings (*reverbSettings)[0x1C];
 
#else
 
 
   XaReverbSettings (*reverbSettings)[0x1A];
 
   XaReverbSettings (*reverbSettings)[0x1A];
#endif
 
 
#endif
 
#endif
  const char *name;
 
 
#ifdef PS3
 
#ifdef PS3
 
   float unknown;
 
   float unknown;
Line 57: Line 65:
 
};
 
};
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
== World at War ==
 
== World at War ==
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">

Revision as of 03:49, 22 January 2015

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;
#ifdef IW6
  XAUDIO2FX_REVERB_I3DL2_PARAMETERS reverbSettings;//Located in xaudio2fx.h which is included in the 360SDK
#else
  XAUDIOREVERBSETTINGS reverbSettings;
#endif
};
 
struct SndGlobalSettings_t
{
  float globalVolumeModifier;
};
 
struct SndDriverGlobals
{
  const char *name;
#ifdef IW6
  SndGlobalSettings_t settings;
#endif
#ifdef XBOX
  XaReverbSettings (*reverbSettings)[0x1A];
#endif
#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;
  unsigned int curveCount;
  SndCurve *curves;
  unsigned int panCount;
  SndPan *pans;
  unsigned int duckGroupCount;
  SndDuckGroup *duckGroups;
  unsigned int contextCount;
  SndContext *contexts;
  unsigned int masterCount;
  SndMaster *masters;
  unsigned int voiceDuckCount;
  SndSidechainDuck *voiceDucks;
  unsigned int futzCount;
  SndFutz *futzes;
};