diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-10-20 16:16:50 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-10-20 16:16:50 +0000 |
commit | ce5773848cb297043bda7a0ab0cc3e0081bffdcf (patch) | |
tree | e527a95b2db3174c75d49c79af35735fbfe3f85a /src/audioOutput_ao.c | |
parent | 608ac668db2dfc4ca5e1b3c68d432086476dd074 (diff) | |
download | mpd-ce5773848cb297043bda7a0ab0cc3e0081bffdcf.tar.gz mpd-ce5773848cb297043bda7a0ab0cc3e0081bffdcf.tar.xz mpd-ce5773848cb297043bda7a0ab0cc3e0081bffdcf.zip |
minor little changes to audio junk
git-svn-id: https://svn.musicpd.org/mpd/trunk@2278 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/audioOutput_ao.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/audioOutput_ao.c b/src/audioOutput_ao.c index 023b7f4a9..6db54f2a5 100644 --- a/src/audioOutput_ao.c +++ b/src/audioOutput_ao.c @@ -44,6 +44,18 @@ static AoData * newAoData() { return ret; } +static void audioOutputAo_error() { + if(errno==AO_ENOTLIVE) { + ERROR("not a live ao device\n"); + } + else if(errno==AO_EOPENDEVICE) { + ERROR("not able to open audio device\n"); + } + else if(errno==AO_EBADOPTION) { + ERROR("bad driver option\n"); + } +} + static void audioOutputAo_initDriver(AudioOutput * audioOutput) { ao_info * ai; char * dup; @@ -183,7 +195,7 @@ static int audioOutputAo_play(AudioOutput * audioOutput, char * playChunk, send = ad->writeSize > size ? size : ad->writeSize; if(ao_play(ad->device, playChunk, send)==0) { - audioError(); + audioOutputAo_error(); ERROR("closing audio device due to write error\n"); audioOutputAo_closeDevice(audioOutput); return -1; |