Microsoft DirectX 8.1 (C++)

DSFXCompressor

The DSFXCompressor structure contains parameters for a compression effect.

Syntax

typedef struct _DSFXCompressor {
  FLOAT  fGain;
  FLOAT  fAttack;
  FLOAT  fRelease;
  FLOAT  fThreshold;
  FLOAT  fRatio;
  FLOAT  fPredelay;
} DSFXCompressor, *LPDSFXCompressor;
 
typedef const DSFXCompressor *LPCDSFXCompressor;

Members

fGain

Output gain of signal after compression, in the range from DSFXCOMPRESSOR_GAIN_MIN to DSFXCOMPRESSOR_GAIN_MAX. The default value is 0 dB.

fAttack

Time before compression reaches its full value, in the range from DSFXCOMPRESSOR_ATTACK_MIN to DSFXCOMPRESSOR_ATTACK_MAX. The default value is 10 ms.

fRelease

Speed at which compression is stopped after input drops below fThreshold, in the range from DSFXCOMPRESSOR_RELEASE_MIN to DSFXCOMPRESSOR_RELEASE_MAX. The default value is 200 ms.

fThreshold

Point at which compression begins, in decibels, in the range from DSFXCOMPRESSOR_THRESHOLD_MIN to DSFXCOMPRESSOR_THRESHOLD_MAX. The default value is -20 dB.

fRatio

Compression ratio, in the range from DSFXCOMPRESSOR_RATIO_MIN to DSFXCOMPRESSOR_RATIO_MAX. The default value is 3, which means 3:1 compression.

fPredelay

Time after lThreshold is reached before attack phase is started, in milliseconds, in the range from DSFXCOMPRESSOR_PREDELAY_MIN to DSFXCOMPRESSOR_PREDELAY_MAX. The default value is 4 ms.

Requirements

  Header: Declared in Dsound.h.

See Also