aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholbrcholberton@gmail.com>2020-08-05 08:04:36 -0500
committerTaylor Holberton <taylorcholbrcholberton@gmail.com>2020-08-05 08:04:36 -0500
commit0052e29a35fdce11d2f66ad793d7b232ce76b5b0 (patch)
tree05f1fcda951f59c1cd8da09547d528830889b0bb
parent997b382b60a41c7d9e2697299a28a23a5c4c4fb5 (diff)
Reordered enums to be compatible with Google's TinyALSA
-rw-r--r--include/tinyalsa/pcm.h25
1 files 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. */