Partager via


mixerGetLineControls (Compact 2013)

3/26/2014

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 MIXERLINECONTROLS structure.

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

    The cbStruct member of the MIXERLINECONTROLS structure must always be initialized to be the size, in bytes, of the MIXERLINECONTROLS structure.

  • 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 pmxlc parameter references a list of MIXERCONTROL structures that will receive information on all controls associated with the audio line identified by the dwLineID member of the MIXERLINECONTROLS structure.

    The cControls member must be initialized to the number of controls associated with the line. This number is retrieved from the cControls member of the MIXERLINE structure returned by the mixerGetLineInfo function.

    The cbmxctrl member must be initialized to the size, in bytes, of a single MIXERCONTROL structure.

    The pamxctrl member must point to the first MIXERCONTROL structure to be filled.

    The dwControlID and dwControlType members are ignored for this query.

    MIXER_GETLINECONTROLSF_ONEBYID

    The pmxlc parameter references a single MIXERCONTROL structure that will receive information on the control identified by the dwControlID member of the MIXERLINECONTROLS structure.

    The cControls member must be initialized to 1.

    The cbmxctrl member must be initialized to the size, in bytes, of a single MIXERCONTROL structure.

    The pamxctrl member must point to a MIXERCONTROL structure to be filled.

    The dwLineID and dwControlType members are ignored for this query. This query is usually used to refresh a control after receiving a MM_MIXM_CONTROL_CHANGE control change notification message by the user-defined callback (see mixerOpen).

    MIXER_GETLINECONTROLSF_ONEBYTYPE

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

    The pmxlc parameter references a single MIXERCONTROL structure that will receive information about the specific control.

    The audio line is identified by the dwLineID member.

    The control class is specified in the dwControlType member of the MIXERLINECONTROLS structure.

    The dwControlID member 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 hmxobj parameter is a mixer device handle returned by the mixerOpen function. This flag is optional.

    MIXER_OBJECTF_MIXER

    The hmxobj parameter is the identifier of a mixer device in the range of zero to one less than the number of devices returned by the mixerGetNumDevs function.

    This flag is optional.

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

    Flags not supported in Windows Embedded Compact

    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 hmxobj parameter specifies an invalid device identifier.

MMSYSERR_INVALFLAG

One or more flags are invalid.

MMSYSERR_INVALHANDLE

The hmxobj parameter 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

See Also

Reference

Hardware Audio Mixer Functions
MIXERLINECONTROLS
MIXERCONTROL
MIXERLINE
mixerGetLineInfo
MM_MIXM_CONTROL_CHANGE
mixerOpen
mixerGetNumDevs