| 20 | static uint32 mrratio; |
| 21 | |
| 22 | void SexyFilter2(int32 *in, int32 count) |
| 23 | { |
| 24 | #ifdef moo |
| 25 | static int64 acc=0; |
| 26 | double x,p; |
| 27 | int64 c; |
| 28 | |
| 29 | x=2*M_PI*6000/FSettings.SndRate; |
| 30 | p=((double)2-cos(x)) - sqrt(pow((double)2-cos(x),2) -1 ); |
| 31 | |
| 32 | c=p*0x100000; |
| 33 | //printf("%f\n",(double)c/0x100000); |
| 34 | #endif |
| 35 | static int64 acc=0; |
| 36 | |
| 37 | while(count--) |
| 38 | { |
| 39 | int64 dropcurrent; |
| 40 | dropcurrent=( int32(uint32(*in)<<16)-acc)>>3; |
| 41 | |
| 42 | acc+=dropcurrent; |
| 43 | *in=acc>>16; |
| 44 | in++; |
| 45 | //acc=((int64)0x100000-c)* *in + ((c*acc)>>20); |
| 46 | //*in=acc>>20; |
| 47 | //in++; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | void SexyFilter(int32 *in, int32 *out, int32 count) |
| 52 | { |