I am wondering how can I ask Windows and retrieve a list over current input devices? Language is C++. The goal is to select from the list in a program I am making. Tried searching a bit, but found nothing..
Please help :)
Thank you.
For the sake of future reference, it might be worth mentioning the RtAudio library, which is also written in C++ and is multiplatform on Windows, OS-X and Linux.
On Windows you can compile it either using the ASIO SDK (in case your devices have an ASIO driver), DirectSound (part of DirectX, old and deprecated, but still working), or WASAPI (introduced in Windows Vista).
With RtAudio you can manage devices very easily with class method calls such as:
RtAudio::startStream();
RtAudio::stopStream();
RtAudio::getDeviceCount();
RtAudio::getDefaultInputDevice();
RtAudio::getDeviceInfo(uint deviceID);
You can also manage output devices in the same fashion.
This can be done through the WaveIn Windows API. Since there is already a post with code to enumarate and retrieve the names of input devices here I won't make a new one.