MCPcopy Create free account
hub / github.com/TASEmulators/fceux / SexyFilter2

Function SexyFilter2

src/filter.cpp:22–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20static uint32 mrratio;
21
22void 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
51void SexyFilter(int32 *in, int32 *out, int32 count)
52{

Callers 1

NeoFilterSoundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected