Equalization

Equalization enables you to control the equalization settings. You first should query the equalization capabilities, since different device drivers may provide different equalization capabilities. These capabilities can include multiple fixed-band equalization or parametric equalization, as well as various treble, bass, and volume settings.

    To determine what equalization features are supported

The following code example shows how to verify specific equalization capabilities supported for a device.

if (AAM_GetEQCaps(&dwCap) == 0) {
    // Verify equalization support.
    if (dwCap & AAM_FLAG_NUMBAND_MASK) {
      fHasEq = TRUE;
      // Set the number of equalization bands.
     lNumEqBands = dwCap&AAM_FLAG_NUMBAND_MASK;
    }
    // Verify loudness support.
    if (dwCap & AAM_FLAG_LOUDNESS) {
    fHasLoudness = TRUE;
    }

    To modify equalization settings

  1. To get the setting for the band, pass AAM_FLAG_GET to the function.
  2. To change the value of the band, pass AAM_FLAG_SET to the function.

The following code example shows how to modify equalization settings.

DWORD dwBand = 2;
LONG lGain;
if (AAM_EQBandControl(dwBand, 
    AAM_FLAG_GAIN | AAM_FLAG_GET, 
    &lGain) != 0)    
{
    lGain ++;
    // Give the equalizer a new band setting.
    AAM_EQBandControl(dwBand, 
        AAM_FLAG_GAIN | 
        AAM_FLAG_SET, &lGain)
}