annotate Input/mpg123/decode.c @ 34:ffddef61dd83 trunk

[svn] Rebuild configure.
author nenolod
date Wed, 26 Oct 2005 00:42:55 -0700
parents cb178e5ad177
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 /*
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 * Mpeg Layer-1,2,3 audio decoder
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * ------------------------------
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 * copyright (c) 1995,1996,1997 by Michael Hipp, All rights reserved.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 * See also 'README'
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 #include <stdlib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 #include <math.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 #include <string.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 #include "mpg123.h"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 #define WRITE_SAMPLE(samples,sum,clip) \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 if( (sum) > 32767.0) { *(samples) = 0x7fff; (clip)++; } \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 else { *(samples) = sum; }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 int
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 mpg123_synth_1to1_8bit(real * bandPtr, int channel,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 unsigned char *samples, int *pnt)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25 short samples_tmp[64];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 short *tmp1 = samples_tmp + channel;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 int i, ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28 int pnt1 = 0;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 ret =
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31 mpg123_synth_1to1(bandPtr, channel, (unsigned char *) samples_tmp,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 &pnt1);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 samples += channel + *pnt;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 for (i = 0; i < 32; i++) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 *samples = (*tmp1 >> 8) ^ 128;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 samples += 2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 tmp1 += 2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 *pnt += 64;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 return ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 int
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 mpg123_synth_1to1_8bit_mono(real * bandPtr, unsigned char *samples, int *pnt)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 short samples_tmp[64];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 short *tmp1 = samples_tmp;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 int i, ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 int pnt1 = 0;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 ret = mpg123_synth_1to1(bandPtr, 0, (unsigned char *) samples_tmp, &pnt1);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54 samples += *pnt;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 for (i = 0; i < 32; i++) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 *samples++ = (*tmp1 >> 8) ^ 128;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 tmp1 += 2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 *pnt += 32;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 return ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 #if 0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66 int
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67 mpg123_synth_1to1_8bit_mono2stereo(real * bandPtr,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68 unsigned char *samples, int *pnt)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 short samples_tmp[64];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 short *tmp1 = samples_tmp;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72 int i, ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73 int pnt1 = 0;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75 ret = mpg123_synth_1to1(bandPtr, 0, (unsigned char *) samples_tmp, &pnt1);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
76 samples += *pnt;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78 for (i = 0; i < 32; i++) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79 *samples++ = (*tmp1 >> 8) ^ 128;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 *samples++ = (*tmp1 >> 8) ^ 128;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81 tmp1 += 2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
82 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83 *pnt += 64;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
84
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
85 return ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
86 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
87 #endif
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
88
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
89 int
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
90 mpg123_synth_1to1_mono(real * bandPtr, unsigned char *samples, int *pnt)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
91 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
92 short samples_tmp[64];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
93 short *tmp1 = samples_tmp;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
94 int i, ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
95 int pnt1 = 0;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
96
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
97 ret = mpg123_synth_1to1(bandPtr, 0, (unsigned char *) samples_tmp, &pnt1);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
98 samples += *pnt;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
99
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
100 for (i = 0; i < 32; i++) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
101 *((short *) samples) = *tmp1;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
102 samples += 2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
103 tmp1 += 2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
104 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
105 *pnt += 64;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
106
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
107 return ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
108 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
109
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
110 #if 0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
111 int
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
112 mpg123_synth_1to1_mono2stereo(real * bandPtr, unsigned char *samples,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
113 int *pnt)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
114 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
115 int i, ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
116
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
117 ret = mpg123_synth_1to1(bandPtr, 0, samples, pnt);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
118 samples = samples + *pnt - 128;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
119
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
120 for (i = 0; i < 32; i++) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
121 ((short *) samples)[1] = ((short *) samples)[0];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
122 samples += 4;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
123 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
124
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
125 return ret;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
126 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
127 #endif
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
128
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
129 int
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
130 mpg123_synth_1to1(real * bandPtr, int channel, unsigned char *out, int *pnt)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
131 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
132 static real buffs[2][2][0x110];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
133 static const int step = 2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
134 static int bo = 1;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
135 short *samples = (short *) (out + *pnt);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
136
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
137 real *b0, (*buf)[0x110];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
138 int clip = 0;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
139 int bo1;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
140 int i = 0;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
141
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
142 /* if(param.equalizer)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
143 do_equalizer(bandPtr,channel); */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
144
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
145 if (!channel) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
146 bo--;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
147 bo &= 0xf;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
148 buf = buffs[0];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
149 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
150 else {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
151 samples++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
152 buf = buffs[1];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
153 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
154
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
155 if (bo & 0x1) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
156 b0 = buf[0];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
157 bo1 = bo;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
158 mpg123_dct64(buf[1] + ((bo + 1) & 0xf), buf[0] + bo, bandPtr);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
159 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
160 else {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
161 b0 = buf[1];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
162 bo1 = bo + 1;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
163 mpg123_dct64(buf[0] + bo, buf[1] + bo + 1, bandPtr);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
164 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
165
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
166 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
167 register int j;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
168 real *window = mpg123_decwin + 16 - bo1;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
169
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
170 for (j = 16; j; j--, window += 0x10, samples += step) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
171 real sum;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
172
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
173 sum = *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
174 sum -= *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
175 sum += *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
176 sum -= *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
177 sum += *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
178 sum -= *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
179 sum += *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
180 sum -= *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
181 sum += *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
182 sum -= *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
183 sum += *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
184 sum -= *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
185 sum += *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
186 sum -= *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
187 sum += *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
188 sum -= *window++ * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
189 i++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
190 WRITE_SAMPLE(samples, sum, clip);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
191 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
192
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
193 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
194 real sum;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
195
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
196 sum = window[0x0] * b0[0x0];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
197 sum += window[0x2] * b0[0x2];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
198 sum += window[0x4] * b0[0x4];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
199 sum += window[0x6] * b0[0x6];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
200 sum += window[0x8] * b0[0x8];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
201 sum += window[0xA] * b0[0xA];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
202 sum += window[0xC] * b0[0xC];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
203 sum += window[0xE] * b0[0xE];
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
204 WRITE_SAMPLE(samples, sum, clip);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
205
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
206 b0 -= 0x10, window -= 0x20, samples += step;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
207 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
208 window += bo1 << 1;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
209
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
210 for (j = 15; j; j--, b0 -= 0x20, window -= 0x10, samples += step) {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
211 real sum;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
212
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
213 sum = -*(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
214 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
215 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
216 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
217 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
218 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
219 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
220 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
221 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
222 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
223 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
224 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
225 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
226 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
227 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
228 sum -= *(--window) * *b0++;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
229 WRITE_SAMPLE(samples, sum, clip);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
230 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
231 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
232
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
233 *pnt += 128;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
234
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
235 return clip;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
236 }