Skip to content

Latest commit

 

History

History
127 lines (100 loc) · 4.8 KB

nf-audioclient-ichannelaudiovolume-setchannelvolume.md

File metadata and controls

127 lines (100 loc) · 4.8 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:audioclient.IChannelAudioVolume.SetChannelVolume
IChannelAudioVolume::SetChannelVolume (audioclient.h)
The SetChannelVolume method sets the volume level for the specified channel in the audio session.
IChannelAudioVolume interface [Core Audio]
SetChannelVolume method
IChannelAudioVolume.SetChannelVolume
IChannelAudioVolume::SetChannelVolume
IChannelAudioVolumeSetChannelVolume
SetChannelVolume
SetChannelVolume method [Core Audio]
SetChannelVolume method [Core Audio]
IChannelAudioVolume interface
audioclient/IChannelAudioVolume::SetChannelVolume
coreaudio.ichannelaudiovolume_setchannelvolume
coreaudio\ichannelaudiovolume_setchannelvolume.htm
CoreAudio
b7baeebf-01d3-4dec-a674-73a84bbf7a66
12/05/2018
IChannelAudioVolume interface [Core Audio],SetChannelVolume method, IChannelAudioVolume.SetChannelVolume, IChannelAudioVolume::SetChannelVolume, IChannelAudioVolumeSetChannelVolume, SetChannelVolume, SetChannelVolume method [Core Audio], SetChannelVolume method [Core Audio],IChannelAudioVolume interface, audioclient/IChannelAudioVolume::SetChannelVolume, coreaudio.ichannelaudiovolume_setchannelvolume
audioclient.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Windows
19H1
IChannelAudioVolume::SetChannelVolume
audioclient/IChannelAudioVolume::SetChannelVolume
c++
APIRef
kbSyntax
COM
Audioclient.h
IChannelAudioVolume.SetChannelVolume

IChannelAudioVolume::SetChannelVolume

-description

The SetChannelVolume method sets the volume level for the specified channel in the audio session.

-parameters

-param dwIndex [in]

The channel number. If the stream format for the audio session has N channels, the channels are numbered from 0 to N– 1. To get the number of channels, call the IChannelAudioVolume::GetChannelCount method.

-param fLevel [in]

The volume level for the channel. Valid volume levels are in the range 0.0 to 1.0.

-param EventContext [in]

Pointer to the event-context GUID. If a call to this method generates a channel-volume-change event, the session manager sends notifications to all clients that have registered IAudioSessionEvents interfaces with the session manager. The session manager includes the EventContext pointer value with each notification. Upon receiving a notification, a client can determine whether it or another client is the source of the event by inspecting the EventContext value. This scheme depends on the client selecting a value for this parameter that is unique among all clients in the session. If the caller supplies a NULL pointer for this parameter, the client's notification method receives a NULL context pointer.

-returns

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

Return code Description
E_INVALIDARG
Parameter dwIndex is set to an invalid channel number, or parameter fLevel is not in the range 0.0 to 1.0.
AUDCLNT_E_DEVICE_INVALIDATED
The audio endpoint device has been unplugged, or the audio hardware or associated hardware resources have been reconfigured, disabled, removed, or otherwise made unavailable for use.
AUDCLNT_E_SERVICE_NOT_RUNNING
The Windows audio service is not running.

-remarks

This method, if it succeeds, generates a channel-volume-change event regardless of whether the new channel volume level differs in value from the previous channel volume level.

-see-also

IAudioSessionEvents Interface

IChannelAudioVolume Interface

IChannelAudioVolume::GetChannelCount