IPerChannelDbLevel::SetLevelUniform method (devicetopology.h)

The SetLevelUniform method sets all channels in the audio stream to the same uniform volume level, in decibels.

Syntax

HRESULT SetLevelUniform(
  [in] float   fLevelDB,
  [in] LPCGUID pguidEventContext
);

Parameters

[in] fLevelDB

The new uniform level in decibels.

[in] pguidEventContext

Context value for the IControlChangeNotify::OnNotify method. This parameter points to an event-context GUID. If the SetLevelUniform call changes the state of the level control, all clients that have registered IControlChangeNotify interfaces with that control 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 control-change event. If the caller supplies a NULL pointer for this parameter, the client's notification method receives a NULL context pointer.

Return value

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_OUTOFMEMORY
Out of memory.

Remarks

If the specified uniform level is beyond the range that the IPerChannelDbLevel::GetLevelRange method reports for a particular channel, the SetLevelUniform call clamps the value for that channel to the supported range and completes successfully. A subsequent call to the IPerChannelDbLevel::GetLevel method retrieves the actual value used for that channel.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header devicetopology.h

See also

IPerChannelDbLevel Interface

IPerChannelDbLevel::GetLevel

IPerChannelDbLevel::GetLevelRange