annotate liba52/liba52.txt @ 19568:bd821fd3e244

Radio support, patch by Vladimir Voroshilov (voroshil gmail com)
author reimar
date Mon, 28 Aug 2006 17:05:18 +0000
parents 35b18ed357c2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3394
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
1 Using the liba52 API
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
2 --------------------
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
3
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
4 liba52 provides a low-level interface to decoding audio frames encoded
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
5 using ATSC standard A/52 aka AC-3. liba52 provides downmixing and
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
6 dynamic range compression for the following output configurations:
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
7
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
8 A52_CHANNEL : Dual mono. Two independant mono channels.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
9 A52_CHANNEL1 : First of the two mono channels above.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
10 A52_CHANNEL2 : Second of the two mono channels above.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
11 A52_MONO : Mono.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
12 A52_STEREO : Stereo.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
13 A52_DOLBY : Dolby surround compatible stereo.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
14 A52_3F : 3 front channels (left, center, right)
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
15 A52_2F1R : 2 front, 1 rear surround channel (L, R, S)
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
16 A52_3F1R : 3 front, 1 rear surround channel (L, C, R, S)
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
17 A52_2F2R : 2 front, 2 rear surround channels (L, R, LS, RS)
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
18 A52_3F2R : 3 front, 2 rear surround channels (L, C, R, LS, RS)
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
19
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
20 A52_LFE : Low frequency effects channel. Normally used to connect a
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
21 subwoofer. Can be combined with any of the above channels.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
22 For example: A52_3F2R | A52_LFE -> 3 front, 2 rear, 1 LFE (5.1)
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
23
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
24
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
25 Initialization
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
26 --------------
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
27
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
28 sample_t * a52_init (uint32_t mm_accel);
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
29
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
30 Initializes the A/52 library. Takes as a parameter the acceptable
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
31 optimizations which may be used, such as MMX. These are found in the
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
32 included header file 'mm_accel', along with an autodetection function
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
33 (mm_accel()). Currently, the only accelleration implemented is
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
34 MM_ACCEL_MLIB, which uses the 'mlib' library if installed. mlib is
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
35 only available on some Sun Microsystems platforms.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
36
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
37 The return value is a pointer to a properly-aligned sample buffer used
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
38 for output samples.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
39
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
40
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
41 Probing the bitstream
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
42 ---------------------
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
43
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
44 int a52_syncinfo (uint8_t * buf, int * flags,
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
45 int * sample_rate, int * bit_rate);
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
46
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
47 The A/52 bitstream is composed of several a52 frames concatenated one
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
48 after each other. An a52 frame is the smallest independantly decodable
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
49 unit in the stream.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
50
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
51 buf must contain at least 7 bytes from the input stream. If these look
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
52 like the start of a valid a52 frame, a52_syncinfo() returns the size
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
53 of the coded frame in bytes, and fills flags, sample_rate and bit_rate
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
54 with the information encoded in the stream. The returned size is
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
55 guaranteed to be an even number between 128 and 3840. sample_rate will
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
56 be the sampling frequency in Hz, bit_rate is for the compressed stream
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
57 and is in bits per second, and flags is a description of the coded
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
58 channels: the A52_LFE bit is set if there is an LFE channel coded in
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
59 this stream, and by masking flags with A52_CHANNEL_MASK you will get a
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
60 value that describes the full-bandwidth channels, as one of the
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
61 A52_CHANNEL...A52_3F2R flags.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
62
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
63 If this can not possibly be a valid frame, then the function returns
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
64 0. You should then try to re-synchronize with the a52 stream - one way
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
65 to try this would be to advance buf by one byte until its contents
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
66 looks like a valid frame, but there might be better
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
67 application-specific ways to synchronize.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
68
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
69 It is recommended to call this function for each frame, for several
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
70 reasons: this function detects errors that the other functions will
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
71 not double-check, consecutive frames might have different lengths, and
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
72 it helps you re-sync with the stream if you get de-synchronized.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
73
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
74
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
75 Starting to decode a frame
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
76 --------------------------
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
77
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
78 int a52_frame (a52_state_t * state, uint8_t * buf, int * flags,
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
79 sample_t * level, sample_t bias);
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
80
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
81 This starts the work of decoding the A/52 frame (to be completed using
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
82 a52_block()). buf should point to the beginning of the complete frame
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
83 of the full size returned by a52_syncinfo().
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
84
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
85 You should pass in the flags the speaker configuration that you
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
86 support, and liba52 will return the speaker configuration it will use
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
87 for its output, based on what is coded in the stream and what you
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
88 asked for. For example, if the stream contains 2+2 channels
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
89 (a52_syncinfo() returned A52_2F2R in the flags), and you have 3+1
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
90 speakers (you passed A52_3F1R), then liba52 will choose do downmix to
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
91 2+1 speakers, since there is no center channel to send to your center
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
92 speaker. So in that case the left and right channels will be
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
93 essentially unmodified by the downmix, and the two surround channels
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
94 will be added together and sent to your surround speaker. liba52 will
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
95 return A52_2F1R to indicate this.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
96
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
97 The good news is that when you downmix to stereo you dont have to
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
98 worry about this, you will ALWAYS get a stereo output no matter what
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
99 was coded in the stream. For more complex output configurations you
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
100 will have to handle the case where liba52 couldnt give you what you
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
101 wanted because some of the channels were not encoded in the stream
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
102 though.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
103
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
104 Level, bias, and A52_ADJUST_LEVEL:
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
105
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
106 Before downmixing, samples are floating point values with a range of
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
107 [-1,1]. Most types of downmixing will combine channels together, which
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
108 will potentially result in a larger range for the output
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
109 samples. liba52 provides two methods of controlling the range of the
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
110 output, either before or after the downmix stage.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
111
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
112 If you do not set A52_ADJUST_LEVEL, liba52 will multiply the samples
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
113 by your level value, so that they fit in the [-level,level]
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
114 range. Then it will apply the standardized downmix equations,
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
115 potentially making the samples go out of that interval again. The
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
116 level parameter is not modified.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
117
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
118 Setting the A52_ADJUST_LEVEL flag will instruct liba52 to treat your
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
119 level value as the intended range interval after downmixing. It will
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
120 then figure out what level to use before the downmix (what you should
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
121 have passed if you hadnt used the A52_ADJUST_LEVEL flag), and
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
122 overwrite the level value you gave it with that new level value.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
123
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
124 The bias represents a value which should be added to the result
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
125 regardless:
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
126
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
127 output_sample = (input_sample * level) + bias;
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
128
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
129 For example, a bias of 384 and a level of 1 tells liba52 you want
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
130 samples between 383 and 385 instead of -1 and 1. This is what the
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
131 sample program a52dec does, as it makes it faster to convert the
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
132 samples to integer format, using a trick based on the IEEE
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
133 floating-point format.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
134
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
135 This function also initialises the state for that frame, which will be
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
136 reused next when decoding blocks.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
137
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
138
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
139 Dynamic range compression
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
140 -------------------------
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
141
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
142 void a52_dynrng (a52_state_t * state,
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
143 sample_t (* call) (sample_t, void *), void * data);
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
144
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
145 This function is purely optional. If you dont call it, liba52 will
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
146 provide the default behaviour, which is to apply the full dynamic
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
147 range compression as specified in the A/52 stream. This basically
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
148 makes the loud sounds softer, and the soft sounds louder, so you can
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
149 more easily listen to the stream in a noisy environment without
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
150 disturbing anyone.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
151
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
152 If you do call this function and set a NULL callback, this will
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
153 totally disable the dynamic range compression and provide a playback
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
154 more adapted to a movie theater or a listening room.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
155
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
156 If you call this function and specify a callback function, this
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
157 callback might be called up to once for each block, with two
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
158 arguments: the compression factor 'c' recommended by the bitstream,
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
159 and the private data pointer you specified in a52_dynrng(). The
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
160 callback will then return the amount of compression to actually use -
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
161 typically pow(c,x) where x is somewhere between 0 and 1. More
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
162 elaborate compression functions might want to use a different value
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
163 for 'x' depending wether c>1 or c<1 - or even something more complex
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
164 if this is what you want.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
165
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
166
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
167 Decoding blocks
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
168 ---------------
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
169
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
170 int a52_block (a52_state_t * state, sample_t * samples);
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
171
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
172 Every A/52 frame is composed of 6 blocks, each with an output of 256
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
173 samples for each channel. The a52_block() function decodes the next
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
174 block in the frame, and should be called 6 times to decode all of the
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
175 audio in the frame. After each call, you should extract the audio data
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
176 from the sample buffer.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
177
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
178 The sample pointer given should be the one a52_init() returned.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
179
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
180 After this function returns, the samples buuffer will contain 256
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
181 samples for the first channel, followed by 256 samples for the second
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
182 channel, etc... the channel order is LFE, left, center, right, left
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
183 surround, right surround. If one of the channels is not present in the
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
184 liba52 output, as indicated by the flags returned by a52_frame(), then
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
185 this channel is skipped and the following channels are shifted so
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
186 liba52 does not leave an empty space between channels.
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
187
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
188
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
189 Pseudocode example
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
190 ------------------
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
191
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
192 sample_t * samples = a52_init (mm_accel());
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
193
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
194 loop on input bytes:
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
195 if at least 7 bytes in the buffer:
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
196
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
197 bytes_to_get = a52_syncinfo (...)
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
198
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
199 if bytes_to_get == 0:
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
200 goto loop to keep looking for sync point
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
201 else
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
202 get rest of bytes
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
203
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
204 a52_frame (state, buf, ...)
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
205 [a52_dynrng (state, ...); this is only optional]
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
206 for i = 1 ... 6:
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
207 a52_block (state, samples)
35b18ed357c2 imported from liba52 CVS
arpi
parents:
diff changeset
208 convert samples to integer and queue to soundcard