diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/audio.c | 2 | ||||
-rw-r--r-- | src/audioOutput.c | 2 | ||||
-rw-r--r-- | src/audioOutput_oss.c | 7 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/audio.c b/src/audio.c index 9df190dd5..0dd1469b1 100644 --- a/src/audio.c +++ b/src/audio.c @@ -44,6 +44,7 @@ static int audioOutputArraySize = 0; extern AudioOutputPlugin aoPlugin; extern AudioOutputPlugin shoutPlugin; +extern AudioOutputPlugin ossPlugin; void initAudioDriver() { ConfigParam * param = NULL; @@ -52,6 +53,7 @@ void initAudioDriver() { initAudioOutputPlugins(); loadAudioOutputPlugin(&aoPlugin); loadAudioOutputPlugin(&shoutPlugin); + loadAudioOutputPlugin(&ossPlugin); while((param = getNextConfigParam(CONF_AUDIO_OUTPUT, param))) { i = audioOutputArraySize++; diff --git a/src/audioOutput.c b/src/audioOutput.c index a1de85942..12f8c17b2 100644 --- a/src/audioOutput.c +++ b/src/audioOutput.c @@ -69,7 +69,7 @@ AudioOutput * newAudioOutput(ConfigParam * param) { } else { ERROR("couldn't find audio output plugin for type \"%s\" at " - "line %i", type, param->line); + "line %i\n", type, param->line); exit(EXIT_FAILURE); } 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; |