IAudioSessionControl interface

The IAudioSessionControl interface enables a client to configure the control parameters for an audio session and to monitor events in the session. The IAudioClient::Initialize method initializes a stream object and assigns the stream to an audio session. The client obtains a reference to the IAudioSessionControl interface on a stream object by calling the IAudioClient::GetService method with parameter riid set to REFIID IID_IAudioSessionControl.

Alternatively, a client can obtain the IAudioSessionControl interface of an existing session without having to first create a stream object and add the stream to the session. Instead, the client calls the IAudioSessionManager::GetAudioSessionControl method with parameter AudioSessionGuid set to the session GUID.

The client can register to receive notification from the session manager when clients change session parameters through the methods in the IAudioSessionControl interface.

When releasing an IAudioSessionControl interface instance, the client must call the interface's Release method from the same thread as the call to IAudioClient::GetService that created the object.

The IAudioSessionControl interface controls an audio session. An audio session is a collection of shared-mode streams. This interface does not work with exclusive-mode streams.

For a code example that uses the IAudioSessionControl interface, see Audio Events for Legacy Audio Applications.

Members

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

Methods

The IAudioSessionControl interface has these methods.

MethodDescription
GetDisplayName

Retrieves the display name for the audio session.

GetGroupingParam

Retrieves the grouping parameter of the audio session.

GetIconPath

Retrieves the path for the display icon for the audio session.

GetState

Retrieves the current state of the audio session.

RegisterAudioSessionNotification

Registers the client to receive notifications of session events, including changes in the session state.

SetDisplayName

Assigns a display name to the current audio session.

SetGroupingParam

Assigns a session to a grouping of sessions.

SetIconPath

Assigns a display icon to the current session.

UnregisterAudioSessionNotification

Deletes a previous registration by the client to receive notifications.

 

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

IAudioClient::GetService
IAudioClient::Initialize
IAudioSessionManager::GetAudioSessionControl
WASAPI

 

 

Community Additions

ADD
Show:
© 2014 Microsoft