ReactOS  0.4.15-dev-1033-gd7d716a
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-2020 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) < 1 \
103  ? 0 \
104  : ( (enc) & MPG123_ENC_8 \
105  ? 1 \
106  : ( (enc) & MPG123_ENC_16 \
107  ? 2 \
108  : ( (enc) & MPG123_ENC_24 \
109  ? 3 \
110  : ( ( (enc) & MPG123_ENC_32 \
111  || (enc) == MPG123_ENC_FLOAT_32 ) \
112  ? 4 \
113  : ( (enc) == MPG123_ENC_FLOAT_64 \
114  ? 8 \
115  : 0 \
116 ) ) ) ) ) )
117 
130 #define MPG123_ZEROSAMPLE(enc, siz, off) ( \
131  (enc) == MPG123_ENC_ULAW_8 \
132  ? (off == 0 ? 0xff : 0x00) \
133  : ( (enc) == MPG123_ENC_ALAW_8 \
134  ? (off == 0 ? 0xd5 : 0x00) \
135  : ( (((enc) & (MPG123_ENC_SIGNED|MPG123_ENC_FLOAT)) || (siz) != ((off)+1)) \
136  ? 0x00 \
137  : 0x80 \
138  ) ) )
139 
148 {
149  long rate;
150  int channels;
153  int encoding;
154 };
155 
156 /* @} */
157 
158 #endif
159 
mpg123_enc_enum
Definition: fmt123.h:43
long rate
Definition: fmt123.h:149
int channels
Definition: fmt123.h:150
int encoding
Definition: fmt123.h:153