Checking for sound cards
Blitz3D Forums/Blitz3D Programming/Checking for sound cards
| ||
Does anyone know of a way to check if there is a sound card connected. Cardless players are getting error messages when trying to run the game. Trying to get more information on error message now |
| ||
Yes, if a sound doesn't load (the LoadSound() function returns 0), it means that no sound card is present (assuming the file you are trying to load does exist). The sound functions are not meant to cause an error, even if you pass 0 to them instead of a valid loaded sound, so you shouldn't really have to detect whether a card is present or not. |
| ||
http://www.blitzbasic.com/codearcs/codearcs.php?code=264 |
| ||
It would be so much cleaner if Blitz merely cancelled playback if card not present. |
| ||
Excellent, thanks guys. |