blob: 5ab61f36c656bbbea1fc38b4fac6907380a2ea77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
extern float decwin[512+32];
int synth_1to1(float *bandPtr,int channel,unsigned char *out,int *pnt)
{
static const int step = 2;
short *samples = (short *) (out+*pnt);
float *b0;
int clip = 0;
int bo1;
{
register int j;
float *window = decwin + 16 - bo1;
for (j=15;j;j--,b0-=0x20,window-=0x10,samples+=step)
{
float sum;
sum -= *(--window) * *b0++;
sum -= *(--window) * *b0++;
sum -= *(--window) * *b0++;
sum -= *(--window) * *b0++;
sum -= *(--window) * *b0++;
sum -= *(--window) * *b0++;
sum -= *(--window) * *b0++;
sum -= *(--window) * *b0++;
if( ( sum ) > 32767.0) *( samples ) = 0x7fff; ( clip )++; ;
}
}
}
|