The waveOutGetNumDevs function retrieves the number of waveform-audio output devices present in the system.
UINT waveOutGetNumDevs();
int waveOutGetNumDevs() => _waveOutGetNumDevs();