Querying Auxiliary Audio Devices

Not all multimedia systems have auxiliary audio support. You can use the auxGetNumDevs function to determine the number of controllable auxiliary devices present in a system.

To get information on a particular auxiliary audio device, use the auxGetDevCaps function. This function takes a pointer to an AUXCAPS structure, which it fills with information on the capabilities of a given device. This information includes the manufacturer and product IDs, a product name for the device, and the device-driver version number. For information on these fields, see “Getting the Capa-bilities of a Device,” earlier in this chapter. The AUXCAPS structure also contains information on the device type and the functionality the device supports. The MMSYSTEM.H file defines the AUXCAPS structure as follows:

typedef struct auxcaps_tag {
        WORD        wMid;                                        /* manufacturer ID */
        WORD        wPid;                                        /* product ID */
        VERSION        vDriverVersion;                        /* driver version */
        char        szPname[MAXPNAMELEN];        /* product name */
        WORD        wTechnology;                        /* device type */
        DWORD        dwSupport;                                /* functionality supported */
} AUXCAPS;

Determining Auxiliary Audio Device Types

The MMSYSTEM.H file defines the following flags for the wTechnology field of the AUXCAPS structure to determine the device type of an auxiliary audio device:

Flag Description

AUXCAPS_CDAUDIO The device is an internal CD-ROM drive.
AUXCAPS_AUXIN The device is an auxiliary audio input jack.

Determining Capabilities of Auxiliary Audio Devices

The dwSupport field of the AUXCAPS structure indicates whether the device driver supports volume changes. The MMSYSTEM.H file defines the following flags for the dwSupport field:

Flag Description

AUXCAPS_VOLUME Volume-control support.
AUXCAPS_LRVOLUME Individual volume-control support for both the left and right channels.