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 retrieves one or more controls associated with an audio line.

Syntax

MMRESULT mixerGetLineControls(
  HMIXEROBJ 
hmxobj, 
  LPMIXERLINECONTROLS 
pmxlc, 
  DWORD 
fdwControls 
);

Parameters

hmxobj

Handle to the mixer device object that is being queried.

pmxlc

Pointer to a MIXERLINECONTROLSstructure.

This structure is used to reference one or more MIXERCONTROLstructures to be filled with information about the controls associated with an audio line.

The cbStructmember of the MIXERLINECONTROLSstructure must always be initialized to be the size, in bytes, of the MIXERLINECONTROLSstructure.

fdwControls

Flags for retrieving information about one or more controls associated with an audio line.

The following table shows the possible flags.

Flag Description

MIXER_GETLINECONTROLSF_ALL

The pmxlcparameter references a list of MIXERCONTROLstructures that will receive information on all controls associated with the audio line identified by the dwLineIDmember of the MIXERLINECONTROLSstructure.

The cControlsmember must be initialized to the number of controls associated with the line. This number is retrieved from the cControlsmember of the MIXERLINEstructure returned by the mixerGetLineInfofunction.

The cbmxctrlmember must be initialized to the size, in bytes, of a single MIXERCONTROLstructure.

The pamxctrlmember must point to the first MIXERCONTROLstructure to be filled.

The dwControlIDand dwControlTypemembers are ignored for this query.

MIXER_GETLINECONTROLSF_ONEBYID

The pmxlcparameter references a single MIXERCONTROLstructure that will receive information on the control identified by the dwControlIDmember of the MIXERLINECONTROLSstructure.

The cControlsmember must be initialized to 1.

The cbmxctrlmember must be initialized to the size, in bytes, of a single MIXERCONTROLstructure.

The pamxctrlmember must point to a MIXERCONTROLstructure to be filled.

The dwLineIDand dwControlTypemembers are ignored for this query. This query is usually used to refresh a control after receiving a MM_MIXM_CONTROL_CHANGEcontrol change notification message by the user-defined callback (see mixerOpen).

MIXER_GETLINECONTROLSF_ONEBYTYPE

The mixerGetLineControlsfunction retrieves information about the first control of a specific class for the audio line that is being queried.

The pmxlcparameter references a single MIXERCONTROLstructure that will receive information about the specific control.

The audio line is identified by the dwLineIDmember.

The control class is specified in the dwControlTypemember of the MIXERLINECONTROLSstructure.

The dwControlIDmember is ignored for this query. This query can be used by an application to get information on a single control associated with a line.

For example, you might want your application to use a peak meter only from a waveform-audio output line.

MIXER_OBJECTF_HMIXER

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

MIXER_OBJECTF_MIXER

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

This flag is optional.

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.

MIXERR_INVALLINE

The audio line 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.

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