ReactOS  0.4.14-dev-55-g2da92ac
fmt123.h
Go to the documentation of this file.
1 /*
2  libmpg123: MPEG Audio Decoder library
3 
4  separate header just for audio format definitions not tied to
5  library code
6 
7  copyright 1995-2015 by the mpg123 project
8  free software under the terms of the LGPL 2.1
9  see COPYING and AUTHORS files in distribution or http://mpg123.org
10 */
11 
12 #ifndef MPG123_ENC_H
13 #define MPG123_ENC_H
14 
44 {
45 /* 0000 0000 0000 1111 Some 8 bit integer encoding. */
46  MPG123_ENC_8 = 0x00f
47 /* 0000 0000 0100 0000 Some 16 bit integer encoding. */
48 , MPG123_ENC_16 = 0x040
49 /* 0100 0000 0000 0000 Some 24 bit integer encoding. */
50 , MPG123_ENC_24 = 0x4000
51 /* 0000 0001 0000 0000 Some 32 bit integer encoding. */
52 , MPG123_ENC_32 = 0x100
53 /* 0000 0000 1000 0000 Some signed integer encoding. */
55 /* 0000 1110 0000 0000 Some float encoding. */
56 , MPG123_ENC_FLOAT = 0xe00
57 /* 0000 0000 1101 0000 signed 16 bit */
59 /* 0000 0000 0110 0000 unsigned 16 bit */
61 /* 0000 0000 0000 0001 unsigned 8 bit */
63 /* 0000 0000 1000 0010 signed 8 bit */
65 /* 0000 0000 0000 0100 ulaw 8 bit */
67 /* 0000 0000 0000 1000 alaw 8 bit */
69 /* 0001 0001 1000 0000 signed 32 bit */
71 /* 0010 0001 0000 0000 unsigned 32 bit */
73 /* 0101 0000 1000 0000 signed 24 bit */
75 /* 0110 0000 0000 0000 unsigned 24 bit */
77 /* 0000 0010 0000 0000 32bit float */
79 /* 0000 0100 0000 0000 64bit float */
81 /* Any possibly known encoding from the list above. */
88 };
89 
101 #define MPG123_SAMPLESIZE(enc) ( \
102  (enc) & MPG123_ENC_8 \
103  ? 1 \
104  : ( (enc) & MPG123_ENC_16 \
105  ? 2 \
106  : ( (enc) & MPG123_ENC_24 \
107  ? 3 \
108  : ( ( (enc) & MPG123_ENC_32 \
109  || (enc) == MPG123_ENC_FLOAT_32 ) \
110  ? 4 \
111  : ( (enc) == MPG123_ENC_FLOAT_64 \
112  ? 8 \
113  : 0 \
114 ) ) ) ) )
115 
124 {
125  long rate;
126  int channels;
129  int encoding;
130 };
131 
132 /* @} */
133 
134 #endif
135 
mpg123_enc_enum
Definition: fmt123.h:43
long rate
Definition: fmt123.h:125
int channels
Definition: fmt123.h:126
int encoding
Definition: fmt123.h:129