How do I detect if the system has a default recording device installed? I bet this can be done through some calls to the Win32 API, anyone has any experience with this?
I’m talking about doing this through code, not by opening the control panel and taking a look under sound options.
Using the DirectX SDK, you can call DirectSoundCaptureEnumerate, which will call your DSEnumCallback function for each DirectSoundCapture device on the system. The first parameter passed to your DSEnumCallback is an LPGUID, which is the ‘Address of the GUID that identifies the device being enumerated, or NULL for the primary device’.
If all you need to do is find out if a recording device is present (I don’t think this is good enough if you really need to know the default device), you can use waveInGetNumDevs: