Change default audio device on Windows 7

前端 未结 2 1672
無奈伤痛
無奈伤痛 2020-12-28 16:10

I want to be able to change the default audio output device on Windows 7 programatically using C# (and probably some underlying Win32 API calls, as well). I\'ve already done

2条回答
  •  礼貌的吻别
    2020-12-28 16:38

    A little up-to-date answer, which is compatible with Windows 10.

    This program is able to do it in a beautiful manner (hotkey to switch between pre-selected devices) and is written on C# : SoundSwitch on GitHub

    Some reverse engineering should get you there (for my use this program was just perfect as it is).

    It makes use of that library (same author) which is in C++ : AudioEndpointLibrary on GitHub

    So if you know C++ (which I don't enough), you might go further in the analysis of how it works. Or just use the library like SoundSwitch does.

提交回复
热议问题