aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutput_oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/audioOutput_oss.c')
-rw-r--r--src/audioOutput_oss.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/audioOutput_oss.c b/src/audioOutput_oss.c
index f73e1a38a..c677c90d2 100644
--- a/src/audioOutput_oss.c
+++ b/src/audioOutput_oss.c
@@ -75,11 +75,13 @@ static int oss_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
if(!bp) {
int fd;
- if(0 <= (fd = open("/dev/sound/dsp", O_WRONLY | O_NONBLOCK))) {
+ if(0 <= (fd = open("/dev/sound/dsp", O_WRONLY))) {
od->device = strdup("/dev/sound/dsp");
+ close(fd);
}
- else if(0 <= (fd = open("/dev/dsp", O_WRONLY | O_NONBLOCK))) {
+ else if(0 <= (fd = open("/dev/dsp", O_WRONLY))) {
od->device = strdup("/dev/dsp");
+ close(fd);
}
else {
ERROR("Error trying to open default OSS device "
@@ -89,7 +91,6 @@ static int oss_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
exit(EXIT_FAILURE);
}
- close(od->fd);
od->fd = -1;
return 0;