Add UNIT_START errno
authorAndre Noll <maan@congo.fml.local>
Sun, 20 Aug 2006 15:26:34 +0000 (17:26 +0200)
committerAndre Noll <maan@congo.fml.local>
Sun, 20 Aug 2006 15:26:34 +0000 (17:26 +0200)
The old code returned -1 which is a bug.

error.h
osx_writer.c

diff --git a/error.h b/error.h
index 3b31d82..cbfb408 100644 (file)
--- a/error.h
+++ b/error.h
@@ -100,6 +100,7 @@ extern const char **para_errlist[];
        PARA_ERROR(READ_STDIN, "failed to read from stdin"), \
        PARA_ERROR(OPEN_COMP, "OpenAComponent() error"), \
        PARA_ERROR(UNIT_INIT, "AudioUnitInitialize() error"), \
+       PARA_ERROR(UNIT_START, "AudioUnitStart() error"), \
        PARA_ERROR(DEFAULT_COMP, "can not find default audio output component"), \
 
 
index 3a52e1e..089b5d7 100644 (file)
@@ -308,7 +308,7 @@ static int osx_write_post_select(__a_unused struct sched *s,
        wn->written = *wng->loaded;
        if (!powd->play) {
                if (AudioOutputUnitStart(powd->output))
-                       return -1;
+                       return -E_UNIT_START;
                powd->play = 1;
        }
        return 1;