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.
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;
}
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)
}