I’m trying to determine if there’s no sound card present so my app doesn’t try to do things it shouldn’t (and have fmod take it down). I thought maybe the system init would return something other than OK, but it doesn’t. I thought maybe the driver count would be 0, but it’s 1 (I see that’s DirectSound’s doing). I wouldn’t like to assume that a driver count of 1 means no sound card, because I’m sure it’s possible to have a single driver and have a sound card.
- kc asked 11 years ago
hm I think you -can- assume 1 = no sound, as when you have a single sound card, directsound always enumerates 2 devices, ‘primary’ and then the device you have. Primary always just happens to be the same as the device you have.
Haven’t really tested it with no soundcard yet, should probably do this soon.
Actually that was easy to test, i just disabled the audio device from the control panel, and yeah with FMOD_OUTPUT_DSOUND (default) there is one device (Primary) but it fails to initialize.
With 1 device, it shows up 2 drivers.
with FMOD_OUTPUT_WINMM it returns 0 when there are no sound devices.
Please login first to submit.