다음을 통해 공유


IAudioEndpointVolumeCallback::OnNotify

Previous Next

IAudioEndpointVolumeCallback::OnNotify

The OnNotify method notifies the client that the volume level or muting state of the audio endpoint device has changed.

HRESULT OnNotify(
  PAUDIO_VOLUME_NOTIFICATION_DATA  pNotify
);

Parameters

pNotify

[in]  Pointer to the volume-notification data. This parameter points to a structure of type AUDIO_VOLUME_NOTIFICATION_DATA.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

The pNotify parameter points to a structure that describes the volume change event that initiated the call to OnNotify. This structure contains an event-context GUID. This GUID enables a client to distinguish between a volume (or muting) change that it initiated and one that some other client initiated. When calling an IAudioEndpointVolume method that changes the volume level of the stream, a client passes in a pointer to an event-context GUID that its implementation of the OnNotify method can recognize. The structure pointed to by pNotify contains this context GUID. If the client that changes the volume level supplies a NULL pointer value for the pointer to the event-context GUID, the value of the event-context GUID in the structure pointed to by pNotify is GUID_NULL.

For a code example that implements the OnNotify method, see Endpoint Volume Controls.

Requirements

Client: Windows Vista

Header: Include Endpointvolume.h.

See Also

Previous Next