IAudioSessionEnumerator::GetSession method

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

Syntax


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

Parameters

SessionCount [in]

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.

Session [out]

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

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Audiopolicy.h

See also

IAudioSessionEnumerator

 

 

Show: