- if (access(audio_device_name, W_OK) != 0)
- {
- Error(ERR_WARN, "cannot access audio device - no sound");
- return SOUND_OFF;
- }
+ /* look for available audio devices, starting with preferred ones */
+ for (i=0; i<sizeof(audio_device_name)/sizeof(char *); i++)
+ if ((audio_fd = OpenAudioDevice(sound_device_name)) >= 0)
+ break;