Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function sets properties of a single control associated with an audio line.

Syntax

MMRESULT mixerSetControlDetails(
  HMIXEROBJ 
hmxobj, 
  LPMIXERCONTROLDETAILS 
pmxcd, 
  DWORD 
fdwDetails 
);

Parameters

hmxobj

Handle to the mixer device object for which properties are being set.

pmxcd

Pointer to a MIXERCONTROLDETAILSstructure.

This structure is used to reference control detail structures that contain the desired state for the control.

fdwDetails

Flags for setting properties for a control.

The following table shows the possible flags.

Flag Description

MIXER_OBJECTF_HMIXER

The hmxobjparameter is a mixer device handle returned by the mixerOpenfunction. This flag is optional.

MIXER_OBJECTF_MIXER

The hmxobjparameter is a mixer device identifier in the range of zero to one less than the number of devices returned by the mixerGetNumDevsfunction.

This flag is optional.

MIXER_SETCONTROLDETAILSF_CUSTOM

A custom dialog box for the specified custom mixer control is displayed.

The mixer device gathers the required information from the user and returns the data in the specified buffer.

The handle for the owning window is specified in the hwndOwnermember of the MIXERCONTROLDETAILSstructure. (This handle can be set to NULL.)

The application can save the data from the dialog box and use it later to reset the control to the same state by using the MIXER_SETCONTROLDETAILSF_VALUE flag.

MIXER_SETCONTROLDETAILSF_VALUE

The current values for a control are set.

The paDetailsmember of the MIXERCONTROLDETAILSstructure points to one or more mixer-control details structures of the appropriate class for the control.

The following flags are supported in other versions of Windows, but not in Windows Embedded CE.

Flags not supported in Windows Embedded CE

MIXER_OBJECTF_AUX

MIXER_OBJECTF_HMIDIN

MIXER_OBJECTF_HMIDIOUT

MIXER_OBJECTF_HWAVEIN

MIXER_OBJECTF_HWAVEOUT

MIXER_OBJECTF_MIDIIN

MIXER_OBJECTF_MIDIOUT

MIXER_OBJECTF_WAVEHOUT

MIXER_OBJECTF_WAVEIN

Return Value

Returns MMSYSERR_NOERROR if successful or an error otherwise.

The following table shows the possible values.

Value Description

MIXERR_INVALCONTROL

The control reference is invalid.

MMSYSERR_BADDEVICEID

The hmxobjparameter specifies an invalid device identifier.

MMSYSERR_INVALFLAG

One or more flags are invalid.

MMSYSERR_INVALHANDLE

The hmxobjparameter specifies an invalid handle.

MMSYSERR_INVALPARAM

One or more parameters are invalid.

MMSYSERR_NODRIVER

No mixer device is available for the object specified by hmxobj.

Remarks

All members of the MIXERCONTROLDETAILSstructure must be initialized before calling mixerSetControlDetails.

If an application needs to retrieve only the current state of a custom mixer control and not display a dialog box, mixerGetControlDetailscan be used with the MIXER_GETCONTROLDETAILSF_VALUE flag.

The Real Time Communications automatic gain control won’t work properly unless the driver (and hardware) supports mixerSetControlDetailson the microphone input. Specifically, the dwControlID field of the MIXERCONTROLDETAILS struct should be equal to MIXERCONTROL_CONTROLTYPE_VOLUME.

Requirements

Header mmsystem.h
Library coredll.lib
Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Version 2.12 requires DXPAK 1.0 or later

See Also