Volume Control
Application-specific hotkeys for Windows
|
Manages a list of AudioDevice instances and related events. More...
Public Member Functions | |
AudioDeviceManager (DataFlow deviceDataFlow, MMDeviceEnumerator deviceEnumerator) | |
Creates a new AudioDeviceManager instance. More... | |
AudioDeviceManager (DataFlow deviceDataFlow) | |
Creates a new AudioDeviceManager instance. More... | |
AudioDevice? | FindDeviceByID (string deviceID, StringComparison comparisonType=StringComparison.Ordinal) |
Gets the AudioDevice instance associated with the given deviceID string. (MMDevice.ID) More... | |
AudioDevice? | FindDeviceByMMDevice (MMDevice mmDevice) |
Gets the AudioDevice instance associated with the given mmDevice . More... | |
AudioDevice? | GetDefaultDevice (DataFlow dataFlow, Role deviceRole) |
Gets the default device for the specified dataFlow & deviceRole . More... | |
void | Dispose () |
Properties | |
IReadOnlyList< AudioDevice > | Devices [get] |
Gets the list of AudioDevice instances. More... | |
DataFlow | DeviceDataFlow [get, set] |
Gets the DataFlow type of the audio devices managed by this AudioDeviceManager instance. More... | |
Events | |
EventHandler< AudioDevice >? | DeviceAddedToList |
Occurs when an AudioDevice was added to the Devices list for any reason. More... | |
EventHandler< AudioDevice >? | DeviceRemovedFromList |
Occurs when an AudioDevice was removed from the Devices list for any reason. More... | |
EventHandler< AudioDevice >? | DeviceStateChanged |
Occurs when an AudioDevice instance's state was changed. More... | |
Manages a list of AudioDevice instances and related events.
The AudioDeviceManager class is responsible for managing the list of active audio devices and handling all events related directly to AudioDevice instances.
VolumeControl.CoreAudio.AudioDeviceManager.AudioDeviceManager | ( | DataFlow | deviceDataFlow, |
MMDeviceEnumerator | deviceEnumerator | ||
) |
Creates a new AudioDeviceManager instance.
deviceDataFlow | The DataFlow type of the devices that this AudioDeviceManager instance will manage. This cannot be changed later. |
deviceEnumerator | The MMDeviceEnumerator instance to use. |
References VolumeControl.Log.FLog.Critical(), and VolumeControl.CoreAudio.AudioDeviceManager.DeviceDataFlow.
VolumeControl.CoreAudio.AudioDeviceManager.AudioDeviceManager | ( | DataFlow | deviceDataFlow | ) |
Creates a new AudioDeviceManager instance.
deviceDataFlow | The DataFlow type of the devices that this AudioDeviceManager instance will manage. This cannot be changed later. |
AudioDevice? VolumeControl.CoreAudio.AudioDeviceManager.FindDeviceByID | ( | string | deviceID, |
StringComparison | comparisonType = StringComparison.Ordinal |
||
) |
Gets the AudioDevice instance associated with the given deviceID string. (MMDevice.ID)
deviceID | The ID of the target device. |
comparisonType | The StringComparison type to use when comparing ID strings. |
null
.Referenced by VolumeControl.CoreAudio.AudioDeviceManager.GetDefaultDevice().
AudioDevice? VolumeControl.CoreAudio.AudioDeviceManager.FindDeviceByMMDevice | ( | MMDevice | mmDevice | ) |
Gets the AudioDevice instance associated with the given mmDevice .
mmDevice | The MMDevice instance associated with the target device. |
null
.AudioDevice? VolumeControl.CoreAudio.AudioDeviceManager.GetDefaultDevice | ( | DataFlow | dataFlow, |
Role | deviceRole | ||
) |
Gets the default device for the specified dataFlow & deviceRole .
dataFlow | The DataFlow of the target device. |
deviceRole | The Role of the target device. |
null
.References VolumeControl.Log.FLog.Error(), and VolumeControl.CoreAudio.AudioDeviceManager.FindDeviceByID().
Referenced by VolumeControl.CoreAudio.AudioDeviceSelector.SelectDefaultDevice().
|
getset |
Gets the DataFlow type of the audio devices managed by this AudioDeviceManager instance.
Referenced by VolumeControl.CoreAudio.AudioDeviceManager.AudioDeviceManager().
|
get |
Gets the list of AudioDevice instances.
Referenced by VolumeControl.CoreAudio.AudioDeviceManager.Dispose(), VolumeControl.CoreAudio.AudioDeviceSelector.SelectNextDevice(), and VolumeControl.CoreAudio.AudioDeviceSelector.SelectPreviousDevice().
EventHandler<AudioDevice>? VolumeControl.CoreAudio.AudioDeviceManager.DeviceAddedToList |
Occurs when an AudioDevice was added to the Devices list for any reason.
EventHandler<AudioDevice>? VolumeControl.CoreAudio.AudioDeviceManager.DeviceRemovedFromList |
Occurs when an AudioDevice was removed from the Devices list for any reason.
Referenced by VolumeControl.CoreAudio.AudioDeviceSelector.AudioDeviceSelector().
EventHandler<AudioDevice>? VolumeControl.CoreAudio.AudioDeviceManager.DeviceStateChanged |
Occurs when an AudioDevice instance's state was changed.