Skip to content

Latest commit

 

History

History
122 lines (92 loc) · 5.71 KB

nf-endpointvolume-iaudioendpointvolume-setchannelvolumelevelscalar.md

File metadata and controls

122 lines (92 loc) · 5.71 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:endpointvolume.IAudioEndpointVolume.SetChannelVolumeLevelScalar
IAudioEndpointVolume::SetChannelVolumeLevelScalar (endpointvolume.h)
The SetChannelVolumeLevelScalar method sets the normalized, audio-tapered volume level of the specified channel in the audio stream that enters or leaves the audio endpoint device.
IAudioEndpointVolume interface [Core Audio]
SetChannelVolumeLevelScalar method
IAudioEndpointVolume.SetChannelVolumeLevelScalar
IAudioEndpointVolume::SetChannelVolumeLevelScalar
IAudioEndpointVolumeSetChannelVolumeLevelScalar
SetChannelVolumeLevelScalar
SetChannelVolumeLevelScalar method [Core Audio]
SetChannelVolumeLevelScalar method [Core Audio]
IAudioEndpointVolume interface
coreaudio.iaudioendpointvolume_setchannelvolumelevelscalar
endpointvolume/IAudioEndpointVolume::SetChannelVolumeLevelScalar
coreaudio\iaudioendpointvolume_setchannelvolumelevelscalar.htm
CoreAudio
2e1f0d1c-060f-45b7-9194-591e45668b52
12/05/2018
IAudioEndpointVolume interface [Core Audio],SetChannelVolumeLevelScalar method, IAudioEndpointVolume.SetChannelVolumeLevelScalar, IAudioEndpointVolume::SetChannelVolumeLevelScalar, IAudioEndpointVolumeSetChannelVolumeLevelScalar, SetChannelVolumeLevelScalar, SetChannelVolumeLevelScalar method [Core Audio], SetChannelVolumeLevelScalar method [Core Audio],IAudioEndpointVolume interface, coreaudio.iaudioendpointvolume_setchannelvolumelevelscalar, endpointvolume/IAudioEndpointVolume::SetChannelVolumeLevelScalar
endpointvolume.h
Windows
Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Windows
19H1
IAudioEndpointVolume::SetChannelVolumeLevelScalar
endpointvolume/IAudioEndpointVolume::SetChannelVolumeLevelScalar
c++
APIRef
kbSyntax
COM
Endpointvolume.h
IAudioEndpointVolume.SetChannelVolumeLevelScalar

IAudioEndpointVolume::SetChannelVolumeLevelScalar

-description

The SetChannelVolumeLevelScalar method sets the normalized, audio-tapered volume level of the specified channel in the audio stream that enters or leaves the audio endpoint device.

-parameters

-param nChannel [in]

The channel number. If the audio stream contains n channels, the channels are numbered from 0 to n– 1. To obtain the number of channels, call the IAudioEndpointVolume::GetChannelCount method.

-param fLevel [in]

The volume level. The volume level is expressed as a normalized value in the range from 0.0 to 1.0.

-param pguidEventContext [in]

Context value for the IAudioEndpointVolumeCallback::OnNotify method. This parameter points to an event-context GUID. If the SetChannelVolumeLevelScalar call changes the volume level of the endpoint, all clients that have registered IAudioEndpointVolumeCallback interfaces with that endpoint will receive notifications. In its implementation of the OnNotify method, a client can inspect the event-context GUID to discover whether it or another client is the source of the volume-change event. If the caller supplies a NULL pointer for this parameter, the notification routine receives the context GUID value GUID_NULL.

-returns

If the method succeeds, it returns S_OK. If the method fails, possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
E_INVALIDARG
Parameter nChannel is greater than or equal to the number of channels in the stream; or parameter fLevel is outside the range from 0.0 to 1.0.
E_OUTOFMEMORY
Out of memory.

-remarks

The volume level is normalized to the range from 0.0 to 1.0, where 0.0 is the minimum volume level and 1.0 is the maximum level. Within this range, the relationship of the normalized volume level to the attenuation of signal amplitude is described by a nonlinear, audio-tapered curve. Note that the shape of the curve might change in future versions of Windows. For more information about audio-tapered curves, see Audio-Tapered Volume Controls.

The normalized volume levels that are passed to this method are suitable to represent the positions of volume controls in application windows and on-screen displays.

-see-also

IAudioEndpointVolume Interface

IAudioEndpointVolume::GetChannelCount

IAudioEndpointVolumeCallback Interface

IAudioEndpointVolumeCallback::OnNotify