From 62e5afb95e3e11c4269664c2d782d4e4e7bc803e Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Thu, 19 Jul 2012 16:10:40 +0200 Subject: [PATCH] spectrascope: fabs->sqrt to calculate the magnitude --- gst/audiovisualizers/gstspectrascope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/audiovisualizers/gstspectrascope.c b/gst/audiovisualizers/gstspectrascope.c index 7089ecceda..430cd9e3ea 100644 --- a/gst/audiovisualizers/gstspectrascope.c +++ b/gst/audiovisualizers/gstspectrascope.c @@ -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;