From 0052e29a35fdce11d2f66ad793d7b232ce76b5b0 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Wed, 5 Aug 2020 08:04:36 -0500 Subject: Reordered enums to be compatible with Google's TinyALSA --- include/tinyalsa/pcm.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h index 36aaf85..f4b7d73 100644 --- a/include/tinyalsa/pcm.h +++ b/include/tinyalsa/pcm.h @@ -141,22 +141,31 @@ extern "C" { * @ingroup libtinyalsa-pcm */ enum pcm_format { - /** Signed, 8-bit */ - PCM_FORMAT_S8 = 1, + +/* Note: This section must stay in the same + * order for binary compatibility with older + * versions of TinyALSA. */ + + PCM_FORMAT_INVALID = -1, /** Signed 16-bit, little endian */ PCM_FORMAT_S16_LE = 0, - /** Signed, 16-bit, big endian */ - PCM_FORMAT_S16_BE = 2, + /** Signed, 32-bit, little endian */ + PCM_FORMAT_S32_LE, + /** Signed, 8-bit */ + PCM_FORMAT_S8, /** Signed, 24-bit (32-bit in memory), little endian */ PCM_FORMAT_S24_LE, - /** Signed, 24-bit (32-bit in memory), big endian */ - PCM_FORMAT_S24_BE, /** Signed, 24-bit, little endian */ PCM_FORMAT_S24_3LE, + +/* End of compatibility section. */ + + /** Signed, 16-bit, big endian */ + PCM_FORMAT_S16_BE, + /** Signed, 24-bit (32-bit in memory), big endian */ + PCM_FORMAT_S24_BE, /** Signed, 24-bit, big endian */ PCM_FORMAT_S24_3BE, - /** Signed, 32-bit, little endian */ - PCM_FORMAT_S32_LE, /** Signed, 32-bit, big endian */ PCM_FORMAT_S32_BE, /** Max of the enumeration list, not an actual format. */ -- cgit v1.2.3