mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
spectrascope: fabs->sqrt to calculate the magnitude
This commit is contained in:
parent
0cf07e04be
commit
62e5afb95e
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue