• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _MONOSCOPE_H
2 #define _MONOSCOPE_H
3 
4 #include <glib.h>
5 #include "convolve.h"
6 
7 #define convolver_depth 8
8 #define convolver_small (1 << convolver_depth)
9 #define convolver_big (2 << convolver_depth)
10 #define scope_width 256
11 #define scope_height 128
12 
13 struct monoscope_state {
14   short copyEq[convolver_big];
15   int avgEq[convolver_small];      /* a running average of the last few. */
16   int avgMax;                     /* running average of max sample. */
17   guint32 display[scope_width * scope_height];
18 
19   convolve_state *cstate;
20   guint32 colors[scope_height / 2];
21 };
22 
23 struct monoscope_state * monoscope_init (guint32 resx, guint32 resy);
24 guint32 * monoscope_update (struct monoscope_state * stateptr, gint16 data [convolver_big]);
25 void monoscope_close (struct monoscope_state * stateptr);
26 
27 #endif
28