When I try to run an XNA application on a windows 7 machine that has an audio device, but it doesn’t have any speakers plugged in, I get the following error message:
Could not find a suitable audio device. Verify that a sound card is
installed, and check the driver properties to make sure it is not
disabled
Is there a way to catch this error an ignore it. I don’t really care if the player has any sound or not, the game should still run in this case.
Same answer as here: In theory it should throw a
NoAudioHardwareException.So try doing something with audio (
SoundEffect.MasterVolumecomes to mind as a possibility, as it is a static method) and see if you can catch the exception. If you do catch an exception, simply do no further audio work.