Get list of audio devices and select one using c#

后端 未结 2 1310
北恋
北恋 2020-12-17 06:33

Hi I am creating a desktop based application in windows using C#.

I have to show list of all available audio & video devices in 2 different combo boxes. Selectin

2条回答
  •  猫巷女王i
    2020-12-17 06:46

    1. There is no documented mechanism for changing the default audio device.
    2. That's because you're enumerating the physical audio devices, not the audio endpoints.
    3. You want to use the IMMDeviceEnumerator API to enumerate the audio endpoints (speakers, etc).

    Unfortunately there is no managed interop published by Microsoft for the IMMDeviceEnumerator API, you'll need to define your own (there are several definitions available on the internet).

提交回复
热议问题