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.
The IAudioSessionEvents interface inherits from the IUnknown interface. IAudioSessionEvents also has these types of members:
The IAudioSessionEvents interface has these methods.
Notifies the client that the volume level of an audio channel in the session submix has changed.
Notifies the client that the display name for the session has changed.
Notifies the client that the grouping parameter for the session has changed.
Notifies the client that the display icon for the session has changed.
Notifies the client that the session has been disconnected.
Notifies the client that the volume level or muting state of the session has changed.
Notifies the client that the stream-activity state of the session has changed.
Minimum supported client
|Windows Vista [desktop apps | Windows Store apps]|
Minimum supported server
|Windows Server 2008 [desktop apps | Windows Store apps]|
Build date: 11/16/2013