ao: Get rid of E_AO_BAD_SAMPLE_FORMAT.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 8 Sep 2018 12:43:58 +0000 (14:43 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 30 Sep 2018 19:31:39 +0000 (21:31 +0200)
This error code is pointless as the generic E_BAD_SAMPLE_FORMAT is
just fine here.

ao_write.c
error.h

index 92f62f8..447dea8 100644 (file)
@@ -87,7 +87,7 @@ static int aow_set_sample_format(unsigned sample_rate, unsigned channels,
                case SF_U8:
                case SF_U16_LE:
                case SF_U16_BE:
-                       return -E_AO_BAD_SAMPLE_FORMAT;
+                       return -E_BAD_SAMPLE_FORMAT;
                case SF_S8:
                        /* no need to set byte_format */
                        result->bits = 8;
diff --git a/error.h b/error.h
index 02f4224..c06d316 100644 (file)
--- a/error.h
+++ b/error.h
@@ -24,7 +24,6 @@
        PARA_ERROR(AO_APPEND_OPTION, "ao append option: memory allocation failure"), \
        PARA_ERROR(AO_BAD_DRIVER, "ao: invalid driver"), \
        PARA_ERROR(AO_BAD_OPTION, "ao option is not of type key:value"), \
-       PARA_ERROR(AO_BAD_SAMPLE_FORMAT, "ao: unsigned sample formats not supported"), \
        PARA_ERROR(AO_DEFAULT_DRIVER, "ao: no usable output device"), \
        PARA_ERROR(AO_EOF, "ao: end of file"), \
        PARA_ERROR(AO_FILE_NOT_SUPP, "ao: file io drivers not supported"), \