Export (0) Print
Expand All
Expand Minimize

mixerSetControlDetails function

The mixerSetControlDetails 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 MIXERCONTROLDETAILS structure. 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 values are defined.

Value Meaning
MIXER_OBJECTF_AUXThe hmxobj parameter is an auxiliary device identifier in the range of zero to one less than the number of devices returned by the auxGetNumDevs function.
MIXER_OBJECTF_HMIDIINThe hmxobj parameter is the handle of a MIDI input device. This handle must have been returned by the midiInOpen function.
MIXER_OBJECTF_HMIDIOUTThe hmxobj parameter is the handle of a MIDI output device. This handle must have been returned by the midiOutOpen function.
MIXER_OBJECTF_HMIXERThe hmxobj parameter is a mixer device handle returned by the mixerOpen function. This flag is optional.
MIXER_OBJECTF_HWAVEINThe hmxobj parameter is a waveform-audio input handle returned by the waveInOpen function.
MIXER_OBJECTF_HWAVEOUTThe hmxobj parameter is a waveform-audio output handle returned by the waveOutOpen function.
MIXER_OBJECTF_MIDIINThe hmxobj parameter is the identifier of a MIDI input device. This identifier must be in the range of zero to one less than the number of devices returned by the midiInGetNumDevs function.
MIXER_OBJECTF_MIDIOUTThe hmxobj parameter is the identifier of a MIDI output device. This identifier must be in the range of zero to one less than the number of devices returned by the midiOutGetNumDevs function.
MIXER_OBJECTF_MIXERThe hmxobj parameter is a mixer device identifier in the range of zero to one less than the number of devices returned by the mixerGetNumDevs function. This flag is optional.
MIXER_OBJECTF_WAVEINThe hmxobj parameter is the identifier of a waveform-audio input device in the range of zero to one less than the number of devices returned by the waveInGetNumDevs function.
MIXER_OBJECTF_WAVEOUTThe hmxobj parameter is the identifier of a waveform-audio output device in the range of zero to one less than the number of devices returned by the waveOutGetNumDevs function.
MIXER_SETCONTROLDETAILSF_CUSTOMA 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 hwndOwner member of the MIXERCONTROLDETAILS structure. (This handle can be set to NULL.) The application can then 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_VALUEThe current value(s) for a control are set. The paDetails member of the MIXERCONTROLDETAILS structure points to one or more mixer-control details structures of the appropriate class for the control.

 

Return value

Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.

Return codeDescription
MIXERR_INVALCONTROL

The control 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.

 

Remarks

All members of the MIXERCONTROLDETAILS structure 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, then mixerGetControlDetails can be used with the MIXER_GETCONTROLDETAILSF_VALUE flag.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mmsystem.h (include Windows.h)

Library

Winmm.lib

DLL

Winmm.dll

See also

Audio Mixers
Audio Mixer Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft