WFX file format

Applies to:
BG2, BG2: ToB

General Description
This file format determines variation for playback of wave sounds. A WFX file controls the variation for the the WAV file with the same basename (e.g. mysound.wfx controls the variation for mysound.wav).

Detailed Description
WFX files only contain a header section. Each WFX file has a constant length of 108h (264) bytes.

Offset Size (datatype) Description
0x0000 4 (char array) Signature ('WFX ')
0x0004 4 (char array) Version ('V1.0')
0x0008 4 (dword) SR Curve Radius
0x000c 4 (dword) Flags:
  • bit 0: Use cutscene volume reduction (reduces all sound channels volume 25% and music volume 50% like in a cutscene)
  • bit 1: Use custom SR curve radius
  • bit 2: Use random frequency variation
  • bit 3: Use random volume variation
  • bit 4: Do not use environmental audio
0x0010 4 (dword) Random frequency variarion
0x0014 4 (dword) Random volume variation (% of 100)
0x0018 240 (bytes) Unused