Volume Control
Application-specific hotkeys for Windows
VolumeControl.CoreAudio.AudioDeviceSessionManager Class Reference

Manages a list of AudioSession instances and their related events for a single CoreAudio.AudioDevice instance. More...

Inheritance diagram for VolumeControl.CoreAudio.AudioDeviceSessionManager:
Collaboration diagram for VolumeControl.CoreAudio.AudioDeviceSessionManager:

Public Member Functions

AudioSessionFindSessionBySessionInstanceIdentifier (string sessionInstanceIdentifier, StringComparison comparisonType=StringComparison.Ordinal)
 Gets the AudioSession instance associated with the given sessionInstanceIdentifier . (AudioSessionControl2.SessionInstanceIdentifier) More...
 
AudioSessionFindSessionByAudioSessionControl (AudioSessionControl2 audioSessionControl)
 Gets the AudioSession instance associated with the given audioSessionControl instance. More...
 
void Dispose ()
 

Properties

AudioDevice AudioDevice [get]
 Gets the CoreAudio.AudioDevice instance that this AudioDeviceSessionManager instance is managing. More...
 
IReadOnlyList< AudioSessionSessions [get]
 Gets the list of AudioSession instances. More...
 

Events

EventHandler< AudioSession >? SessionAddedToList
 Occurs when an AudioSession is added to the Sessions list for any reason. More...
 
EventHandler< AudioSession >? SessionRemovedFromList
 Occurs when an AudioSession is removed from the Sessions list for any reason. More...
 

Detailed Description

Manages a list of AudioSession instances and their related events for a single CoreAudio.AudioDevice instance.

This class is highly coupled to CoreAudio.AudioDevice, and cannot be constructed externally.
If you're looking for a session manager that works with multiple CoreAudio.AudioDevice instances, see AudioSessionManager.

Member Function Documentation

◆ FindSessionByAudioSessionControl()

AudioSession? VolumeControl.CoreAudio.AudioDeviceSessionManager.FindSessionByAudioSessionControl ( AudioSessionControl2  audioSessionControl)

Gets the AudioSession instance associated with the given audioSessionControl instance.

Parameters
audioSessionControlThe AudioSessionControl2 instance associated with the target session.
Returns
The AudioSession associated with the given audioSessionControl if found; otherwise null.

◆ FindSessionBySessionInstanceIdentifier()

AudioSession? VolumeControl.CoreAudio.AudioDeviceSessionManager.FindSessionBySessionInstanceIdentifier ( string  sessionInstanceIdentifier,
StringComparison  comparisonType = StringComparison.Ordinal 
)

Gets the AudioSession instance associated with the given sessionInstanceIdentifier . (AudioSessionControl2.SessionInstanceIdentifier)

Parameters
sessionInstanceIdentifierThe SessionInstanceIdentifier GUID of the target session.
comparisonTypeThe StringComparison type to use when comparing ID strings.
Returns
The AudioSession associated with the given sessionInstanceIdentifier if found; otherwise null.

Property Documentation

◆ AudioDevice

AudioDevice VolumeControl.CoreAudio.AudioDeviceSessionManager.AudioDevice
get

Gets the CoreAudio.AudioDevice instance that this AudioDeviceSessionManager instance is managing.

◆ Sessions

IReadOnlyList<AudioSession> VolumeControl.CoreAudio.AudioDeviceSessionManager.Sessions
get

Event Documentation

◆ SessionAddedToList

EventHandler<AudioSession>? VolumeControl.CoreAudio.AudioDeviceSessionManager.SessionAddedToList

◆ SessionRemovedFromList

EventHandler<AudioSession>? VolumeControl.CoreAudio.AudioDeviceSessionManager.SessionRemovedFromList

The documentation for this class was generated from the following file: