diff options
author | Richard Boulton <richard@tartarus.org> | 2002-03-08 16:43:08 +0000 |
---|---|---|
committer | Richard Boulton <richard@tartarus.org> | 2002-03-08 16:43:08 +0000 |
commit | 31b3a71dc8ce8f38b4e7a51ccb6cb1dbfc3a75b6 (patch) | |
tree | bd3a0b0dcc65bb49e8cdd35bf32c4b1a70510491 /gst/monoscope/monoscope.h | |
parent | fef1a9307ee15214fe0882df6b4f6ce65adbeb55 (diff) |
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. :)
Diffstat (limited to 'gst/monoscope/monoscope.h')
-rw-r--r-- | gst/monoscope/monoscope.h | 20 |
1 files changed, 17 insertions, 3 deletions
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 <glib.h> +#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 |