It is done with IPolicyConfig.SetDefaultEndpoint (samples on Google)
But it is global, not application specific
Set active audio endpoint
Marcel Lorenz
86
Reputation points
I want to set the active audio endpoint/output device, in the best case process-/application-specific. I know roughly how to read out the endpoints using:
- EnumAudioEndpoints
- MMDeviceEnumerator
- ManagementObjectSearcher (SELECT * FROM Win32_SoundDevice)
But I don't know how to activate them/set them as the current output device. Like I mentioned above I would like to do it process-/application-specific. I more or less found how to do it with PowerShell but not with C#.
Accepted answer
-
Castorix31 85,546 Reputation points
2021-01-11T18:23:41.823+00:00