Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IAudioSessionEvents interface

The IAudioSessionEvents interface provides notifications of session-related events such as changes in the volume level, display name, and session state. Unlike the other interfaces in this section, which are implemented by the WASAPI system component, a WASAPI client implements the IAudioSessionEvents interface. To receive event notifications, the client passes a pointer to its IAudioSessionEvents interface to the IAudioSessionControl::RegisterAudioSessionNotification method.

After registering its IAudioClientSessionEvents interface, the client receives event notifications in the form of callbacks through the methods in the interface.

In implementing the IAudioSessionEvents interface, the client should observe these rules to avoid deadlocks and undefined behavior:

  • The methods in the interface must be nonblocking. The client should never wait on a synchronization object during an event callback.
  • The client should never call the IAudioSessionControl::UnregisterAudioSessionNotification method during an event callback.
  • The client should never release the final reference on a WASAPI object during an event callback.

For a code example that implements an IAudioSessionEvents interface, see Audio Session Events. For a code example that registers a client's IAudioSessionEvents interface to receive notifications, see Audio Events for Legacy Audio Applications.

Members

The IAudioSessionEvents interface inherits from the IUnknown interface. IAudioSessionEvents also has these types of members:

Methods

The IAudioSessionEvents interface has these methods.

MethodDescription
OnChannelVolumeChanged

Notifies the client that the volume level of an audio channel in the session submix has changed.

OnDisplayNameChanged

Notifies the client that the display name for the session has changed.

OnGroupingParamChanged

Notifies the client that the grouping parameter for the session has changed.

OnIconPathChanged

Notifies the client that the display icon for the session has changed.

OnSessionDisconnected

Notifies the client that the session has been disconnected.

OnSimpleVolumeChanged

Notifies the client that the volume level or muting state of the session has changed.

OnStateChanged

Notifies the client that the stream-activity state of the session has changed.

 

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Audiopolicy.h

See also

IAudioSessionControl::RegisterAudioSessionNotification
IAudioSessionControl::UnregisterAudioSessionNotification
WASAPI

 

 

Community Additions

Show:
© 2014 Microsoft