IAudioSessionEnumerator::GetSession method (audiopolicy.h)

The GetSession method gets the audio session specified by an audio session number.

Syntax

HRESULT GetSession(
  [in]  int                  SessionCount,
  [out] IAudioSessionControl **Session
);

Parameters

[in] SessionCount

The session number. If there are n sessions, the sessions are numbered from 0 to n – 1. To get the number of sessions, call the IAudioSessionEnumerator::GetCount method.

[out] Session

Receives a pointer to the IAudioSessionControl interface of the session object in the collection that is maintained by the session enumerator. The caller must release the interface pointer.

Return value

If the method succeeds, it returns S_OK.

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

IAudioSessionEnumerator