From 31b3a71dc8ce8f38b4e7a51ccb6cb1dbfc3a75b6 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Fri, 8 Mar 2002 16:43:08 +0000 Subject: Remove static structures: you can now have multiple monoscopes, and they'll actually display different things. :) Original commit message from CVS: Remove static structures: you can now have multiple monoscopes, and they'll actually display different things. :) --- gst/monoscope/monoscope.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'gst/monoscope/monoscope.h') diff --git a/gst/monoscope/monoscope.h b/gst/monoscope/monoscope.h index 29fdf10c..1a2a29f5 100644 --- a/gst/monoscope/monoscope.h +++ b/gst/monoscope/monoscope.h @@ -2,9 +2,23 @@ #define _MONOSCOPE_H #include +#include "convolve.h" -void monoscope_init (guint32 resx, guint32 resy); -guint32 * monoscope_update (gint16 data [512]); -void monoscope_close (); +#define scope_width 256 +#define scope_height 128 + +struct monoscope_state { + gint16 copyEq[CONVOLVE_BIG]; + int avgEq[CONVOLVE_SMALL]; // a running average of the last few. + int avgMax; // running average of max sample. + guint32 display[(scope_width + 1) * (scope_height + 1)]; + + convolve_state *cstate; + guint32 colors[64]; +}; + +struct monoscope_state * monoscope_init (guint32 resx, guint32 resy); +guint32 * monoscope_update (struct monoscope_state * stateptr, gint16 data [512]); +void monoscope_close (struct monoscope_state * stateptr); #endif -- cgit