spectrascope: fabs->sqrt to calculate the magnitude

This commit is contained in:
Stefan Sauer 2012-07-19 16:10:40 +02:00
parent 0cf07e04be
commit 62e5afb95e

View file

@ -209,7 +209,7 @@ gst_spectra_scope_render (GstAudioVisualizer * bscope, GstBuffer * audio,
* or even better do a log mapping? */
fr = (gfloat) fdata[1 + x].r / 512.0;
fi = (gfloat) fdata[1 + x].i / 512.0;
y = (guint) (h * fabs (fr * fr + fi * fi));
y = (guint) (h * sqrt (fr * fr + fi * fi));
if (y > h)
y = h;
y = h - y;