IAudioSessionManager2::UnregisterDuckNotification method (audiopolicy.h)

The UnregisterDuckNotification method deletes a previous registration by the application to receive notifications.

Syntax

HRESULT UnregisterDuckNotification(
  IAudioVolumeDuckNotification *duckNotification
);

Parameters

duckNotification

Pointer to the IAudioVolumeDuckNotification interface that is implemented by the application. Pass the same interface pointer that was specified to the session manager in a previous call to the IAudioSessionManager2::RegisterDuckNotification method. If the UnregisterDuckNotification method succeeds, it calls the Release method on the application's IAudioVolumeDuckNotification interface.

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 value Description
E_POINTER
duckNotification is NULL.

Remarks

The application calls this method when it no longer needs to receive notifications. The UnregisterDuckNotification method removes the registration of an IAudioVolumeDuckNotification interface that the application previously registered with the session manager by calling the IAudioSessionManager2::RegisterDuckNotification method.

After the application calls UnregisterDuckNotification, any pending events are not reported to the application.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header audiopolicy.h

See also

Default Ducking Experience

Getting Ducking Events

IAudioSessionManager2