Razvan
8th June 2002, 10:04
Hi everybody,
I just made a LED output plugin, using as a framework the mini_sdk I downloaded from this site. The only problem is that the plugin seems to act only on high frequencies and I want it to act on the low ones. I can't do this since I don't know what waveformData contains.
This is my render function:
int render(struct winampVisModule *this_mod)
{
int x, y;
static int draw=0;
for(y=0;y<=1;y++)
{
int last=this_mod->waveformData[y][0];
int total=0;
for (x = 1; x < 576; x ++)
{
last = abs(last - this_mod->waveformData[y][x]);
last = this_mod->waveformData[y][x];
}
total /= 200;
if (total > 252) total = 252;
if(total>draw) draw=total;
else draw-=15;
out_signal(draw/32); //this is the function that outputs
//the signal. out_signal(1) will light the
//fist led, out_signal(2)
//will light the first two leds, and so on.
}
return 0;
}
I just made a LED output plugin, using as a framework the mini_sdk I downloaded from this site. The only problem is that the plugin seems to act only on high frequencies and I want it to act on the low ones. I can't do this since I don't know what waveformData contains.
This is my render function:
int render(struct winampVisModule *this_mod)
{
int x, y;
static int draw=0;
for(y=0;y<=1;y++)
{
int last=this_mod->waveformData[y][0];
int total=0;
for (x = 1; x < 576; x ++)
{
last = abs(last - this_mod->waveformData[y][x]);
last = this_mod->waveformData[y][x];
}
total /= 200;
if (total > 252) total = 252;
if(total>draw) draw=total;
else draw-=15;
out_signal(draw/32); //this is the function that outputs
//the signal. out_signal(1) will light the
//fist led, out_signal(2)
//will light the first two leds, and so on.
}
return 0;
}