device = "/dev/dsp";
else if(access("/dev/audio", W_OK) == 0)
device = "/dev/audio";
+ else {
+ error(0, "cannot determine default OSS device");
+ goto failed;
+ }
} else
device = config->device; /* just believe the user */
/* Open the device */
return;
failed:
device_state = device_error;
- if(ossfd >= 0)
+ if(ossfd >= 0) {
xclose(ossfd);
+ ossfd = -1;
+ }
}
/** @brief Play via OSS */
static int oss_slot;
/** @brief Fill in poll fd array for OSS */
-static void oss_beforepoll(void) {
+static void oss_beforepoll(int attribute((unused)) *timeoutp) {
oss_slot = addfd(ossfd, POLLOUT|POLLERR);
}