Detect if sound card is present/enabled?
Detect if sound card is present/enabled?
Asking mainly for Windows. Need a way to check if a sound card is present and enabled, because not all users have one (as I recently found out), and if not found or enabled then some sound code can crash my app (like getting the volume and mute status). I tried using InitSound() but Fred said that's not the way.
Re: Detect if sound card is present/enabled?
Thanks, but that doesn't work: it just loads the sound and plays it silently. I don't want that; I want it to message me that no sound can be played because there's no audio device enabled on the PC.
This is what Winamp shows when no audio device is available/enabled. I'd love to show something like that.

This is what Winamp shows when no audio device is available/enabled. I'd love to show something like that.

Re: Detect if sound card is present/enabled?
@BarryG
I suggest you try the following:
enumerate hardware devices
P.S. If the hardware is not present in the system, then this should work and it is obvious.
P.S.2. Also you can use the console utility, known as 'devcon.exe'. Be careful, it has two different version (x86 _n_ x64).
I suggest you try the following:
enumerate hardware devices
P.S. If the hardware is not present in the system, then this should work and it is obvious.
P.S.2. Also you can use the console utility, known as 'devcon.exe'. Be careful, it has two different version (x86 _n_ x64).
Re: Detect if sound card is present/enabled?
Update MediaGetVolume
Link: viewtopic.php?p=640610#p640610
Link: viewtopic.php?p=640610#p640610
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive