Hi there!
It seems that the wave data supplied to WMP visualizations is completely wrong. (Tested with the BetterBars viz from WMPPlugins.com). Allthough probably not used much, here's an suggestion:
Regards,
Symph
It seems that the wave data supplied to WMP visualizations is completely wrong. (Tested with the BetterBars viz from WMPPlugins.com). Allthough probably not used much, here's an suggestion:
Code:
....
// Convert float value between -1 and 1 to 0 and 255
float val = (buf[i] + 1f) * 127.5f;
if (val < 0)
val = 0;
else if (val > 255)
val = 255;
// Left Channel
if (i % 2 == 0)
{
audioData[x] = (byte)val;
}
// Right Channel
else
{
audioData[x + 1024] = (byte)val;
x++;
}
....
Regards,
Symph