From 4b016cafa1e44294605467dd95efb421b96574a5 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Sat, 5 Mar 2005 21:09:32 +0000 Subject: wee bit of code cleanup git-svn-id: https://svn.musicpd.org/mpd/trunk@3021 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/audioOutputs/audioOutput_oss.c | 4 +++- src/audioOutputs/audioOutput_shout.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/audioOutputs') diff --git a/src/audioOutputs/audioOutput_oss.c b/src/audioOutputs/audioOutput_oss.c index 012952502..70ae04695 100644 --- a/src/audioOutputs/audioOutput_oss.c +++ b/src/audioOutputs/audioOutput_oss.c @@ -254,8 +254,10 @@ static int oss_playAudio(AudioOutput * audioOutput, char * playChunk, while (size > 0) { ret = write(od->fd, playChunk, size); + if(errno == EINTR) continue; if(ret<0) { - ERROR("closing audio device due to write error\n"); + ERROR("closing oss device \"%s\" due to write error: " + "%s\n", od->device, strerror(errno)); oss_closeDevice(audioOutput); return -1; } diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c index 16b27947e..9a54eb8a9 100644 --- a/src/audioOutputs/audioOutput_shout.c +++ b/src/audioOutputs/audioOutput_shout.c @@ -320,7 +320,7 @@ static void finishEncoder(ShoutData * sd) { } static int flushEncoder(ShoutData * sd) { - return !(ogg_stream_pageout(&sd->os, &sd->og) <= 0 ); + return (ogg_stream_pageout(&sd->os, &sd->og) > 0); } static void clearEncoder(ShoutData * sd) { -- cgit v1.2.3