MIXER_INFO

typedef struct _MIXER_INFO {
    ULONG    Key;
#define MIX_INFO_KEY       (*(ULONG *)"Mix")
    UCHAR         NumberOfLines;
    UCHAR         NumberOfControls;
    LARGE_INTEGER CurrentLogicalTime;
    LIST_ENTRY    NotifyQueue;
    LIST_ENTRY    ChangedItems;
    PMIXER_DD_GET_SET_DATA HwGetLineData;
    PMIXER_DD_GET_SET_DATA HwGetControlData;
    PMIXER_DD_GET_SET_DATA HwGetCombinedControlData;
    PMIXER_DD_GET_SET_DATA HwSetControlData;
} MIXER_INFO, *PMIXER_INFO;
 

The MIXER_INFO structure contains context information for a mixer device.

Members
Key
Internal only, for debugging. Should be “Mix”.
NumberOfLines
Number of mixer lines.
NumberOfControls
Number of mixer controls.
CurrentLogicalTime
Internal only. Incremented each time an item is added to the ChangedItems queue. Used as a reference for determining the relative age of changed items.
NotifyQueue
Internal only. Pointer to an IRP queue of change notification targets. An IRP is added each time soundlib.lib receives an IOCTL_MIX_REQUEST_NOTIFY message.
ChangedItems
Internal only. Pointer to a list of mixer items of type MIXER_DATA_ITEM. Modified by SoundMixerChangedItem.
HwGetLineData
Pointer to a driver-supplied function that SoundMixerDispatch calls when it receives an IOCTL_MIX_GET_LINE_DATA message. The function type is PMIXER_DD_GET_SET_DATA, where the data parameter is a pointer to the fdwLine member of a MIXERLINE structure, and the length parameter is the member’s size. The function sets one or more of the following flags in the address pointed to by data.

Flag

Definition

MIXERLINE_LINEF_ACTIVE

Indicates that the line is active. Used mainly for waveform devices so the application can determine when to poll the peak meter.

MIXERLINE_LINEF_DISCONNECTED

Indicates that the line is permanently unavailable. Useful for disabling capabilities available only on some versions of the hardware.

MIXERLINE_LINEF_SOURCE

Indicates this is a source line, not a destination line.

These flags are defined in mmsystem.h. The MIXERLINE structure is described in the Win32 SDK.

HwGetControlData
Pointer to a driver-supplied function that SoundMixerDispatch calls when it receives an IOCTL_MIX_GET_CONTROL_DATA message. The function type is PMIXER_DD_GET_SET_DATA, where the length parameter is the size of the return buffer and the data parameter is the return buffer’s address. This address is the paDetails member of a MIXERCONTROLDETAILS structure. See the description of MIXERCONTROLDETAILS in the Win32 SDK for information on how the buffer should be filled.
HwGetCombinedControlData
Pointer to a driver-supplied function that returns the current values for the volume controls. If the volume is controlled by mixer hardware, then always return 0xFFFF for each control. Otherwise, if the master volume is supported in hardware, return the current value of the control. If the master volume is simulated, return the combined volume and master volume as a volume value.

The function type is PMIXER_DD_GET_SET_DATA, where the data parameter is a pointer to a WAVE_DD_VOLUME structure and the length parameter is the structure’s size.

HwSetControlData
Pointer to a driver-supplied function that SoundMixerDispatch calls when it receives an IRP_MJ_WRITE message to set control items. The soundlib.lib dispatchers for waveform, MIDI synthesizer, and auxiliary audio devices also call this function to set volume levels. Function type is PMIXER_DD_GET_SET_DATA, where the length parameter is the size of the data buffer and the data parameter is the data buffer’s address. This address is the paDetails member of a MIXERCONTROLDETAILS structure. Refer to the description of MIXERCONTROLDETAILS in the Win32 SDK to understand the buffer contents. The function should call SoundMixerChangedItem if the value of a control changes.
Comments

MIXER_INFO is defined in mixer.h.

Allocate a MIXER_INFO structure from the nonpaged memory pool by calling ExAllocatePool. To zero and initialize a MIXER_INFO structure, call SoundInitMixerInfo.

To create a mixer device object, call SoundCreateDevice and specify a MIXER_INFO structure pointer for the DeviceSpecificData parameter. Then assign the address of the mixer device’s LOCAL_DEVICE_INFO structure to the MixerDevice member of every other device’s LOCAL_DEVICE_INFO structure.