Solution
To acquire device names and IDs, you could make use of the Sound Device Info.vi, which is located under
\LabVIEW XXXX\vi.lib\sound2\lvsound2.llb. The example below shows one way of achieve this.
The "isInput?" bool option provides the user with the ability switch between listings of either input (such as microphones) IDs or output (such as speakers or headphone) IDs.
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW block diagram.