Sound Driver Globals Asset: Difference between revisions
Aerosoul94 (talk | contribs) |
Aerosoul94 (talk | contribs) |
||
| (5 intermediate revisions by 2 users not shown) | |||
| 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 | ||
XaReverbSettings (*reverbSettings)[0x1A]; | XaReverbSettings (*reverbSettings)[0x1A]; | ||
#endif | #endif | ||
#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"> | ||
struct snd_reverb_patch_t | |||
{ | |||
char name[32]; | |||
float room; | |||
float roomHF; | |||
float roomRolloffFactor; | |||
float decayTime; | |||
float decayHFRatio; | |||
float reflections; | |||
float reflectionsDelay; | |||
float reverb; | |||
float reverbDelay; | |||
float diffusion; | |||
float density; | |||
float HFReference; | |||
}; | |||
enum snd_limit_type_t | |||
{ | |||
SND_LIMIT_NONE = 0x0, | |||
SND_LIMIT_OLDEST = 0x1, | |||
SND_LIMIT_REJECT = 0x2, | |||
SND_LIMIT_PRIORITY = 0x3, | |||
SND_LIMIT_SOFTEST = 0x4, | |||
SND_LIMIT_COUNT = 0x5, | |||
}; | |||
enum snd_category_t | |||
{ | |||
SND_CATEGORY_SFX = 0x0, | |||
SND_CATEGORY_MUSIC = 0x1, | |||
SND_CATEGORY_VOICE = 0x2, | |||
}; | |||
struct snd_bus_info_t | |||
{ | |||
char name[32]; | |||
float volumeMod; | |||
int maxVoices; | |||
int restricted; | |||
int pausable; | |||
int stopOnDeath; | |||
int isMusic; | |||
snd_category_t category; | |||
snd_limit_type_t voiceLimitType; | |||
}; | |||
struct snd_curve_t | |||
{ | |||
char name[32]; | |||
int pointCount; | |||
float points[8][2]; | |||
}; | |||
struct snd_speaker_map | |||
{ | |||
int input_channel_count; | |||
int output_channel_count; | |||
float volumes[16]; | |||
}; | |||
struct snd_speaker_map_set | |||
{ | |||
char name[32]; | |||
snd_speaker_map channelMaps[4]; | |||
}; | |||
struct snd_master_effect_t | |||
{ | |||
char name[32]; | |||
float masterRingmod; | |||
float reverbRingmod; | |||
float masterLPRatio; | |||
float masterLPDB; | |||
float masterHPRatio; | |||
float masterHPDB; | |||
}; | |||
struct SndDriverGlobals | struct SndDriverGlobals | ||
{ | { | ||
const char * name; | const char * name; | ||
snd_reverb_patch_t reverbPatches[64]; | |||
snd_bus_info_t buses[64]; | |||
snd_curve_t curves[32]; | |||
snd_speaker_map_set speakerMaps[32]; | |||
snd_master_effect_t masterEffects[16]; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Black Ops 1 == | == Black Ops 1 == | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
| Line 70: | Line 162: | ||
{ | { | ||
char name[0x20]; | char name[0x20]; | ||
char | char parent[0x20]; | ||
unsigned int nameHash; | unsigned int nameHash; | ||
int unknown2; | int unknown2; | ||
int category; | int category; | ||
short attenuationSp; | |||
short attenuationMp; | |||
}; | }; | ||
| Line 82: | Line 174: | ||
char name[0x20]; | char name[0x20]; | ||
unsigned int nameHash; | unsigned int nameHash; | ||
vec2_t xy[8]; | |||
}; | }; | ||
| Line 170: | Line 262: | ||
== Black Ops 2 == | == Black Ops 2 == | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
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 | struct SndDriverGlobals | ||
{ | { | ||
const char * name; | 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; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 17:45, 7 February 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 snd_reverb_patch_t
{
char name[32];
float room;
float roomHF;
float roomRolloffFactor;
float decayTime;
float decayHFRatio;
float reflections;
float reflectionsDelay;
float reverb;
float reverbDelay;
float diffusion;
float density;
float HFReference;
};
enum snd_limit_type_t
{
SND_LIMIT_NONE = 0x0,
SND_LIMIT_OLDEST = 0x1,
SND_LIMIT_REJECT = 0x2,
SND_LIMIT_PRIORITY = 0x3,
SND_LIMIT_SOFTEST = 0x4,
SND_LIMIT_COUNT = 0x5,
};
enum snd_category_t
{
SND_CATEGORY_SFX = 0x0,
SND_CATEGORY_MUSIC = 0x1,
SND_CATEGORY_VOICE = 0x2,
};
struct snd_bus_info_t
{
char name[32];
float volumeMod;
int maxVoices;
int restricted;
int pausable;
int stopOnDeath;
int isMusic;
snd_category_t category;
snd_limit_type_t voiceLimitType;
};
struct snd_curve_t
{
char name[32];
int pointCount;
float points[8][2];
};
struct snd_speaker_map
{
int input_channel_count;
int output_channel_count;
float volumes[16];
};
struct snd_speaker_map_set
{
char name[32];
snd_speaker_map channelMaps[4];
};
struct snd_master_effect_t
{
char name[32];
float masterRingmod;
float reverbRingmod;
float masterLPRatio;
float masterLPDB;
float masterHPRatio;
float masterHPDB;
};
struct SndDriverGlobals
{
const char * name;
snd_reverb_patch_t reverbPatches[64];
snd_bus_info_t buses[64];
snd_curve_t curves[32];
snd_speaker_map_set speakerMaps[32];
snd_master_effect_t masterEffects[16];
};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;
};