Set active audio endpoint

Marcel Lorenz 81 Reputation points
2021-01-11T18:13:44.617+00:00

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:

  1. EnumAudioEndpoints
  2. MMDeviceEnumerator
  3. 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#.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,458 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 82,241 Reputation points
    2021-01-11T18:23:41.823+00:00

    It is done with IPolicyConfig.SetDefaultEndpoint (samples on Google)
    But it is global, not application specific


0 additional answers

Sort by: Most helpful