summaryrefslogtreecommitdiffstats
path: root/gst/monoscope/monoscope.h
blob: 37be6fff35944af67cde8732ca58de42ad45301c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef _MONOSCOPE_H
#define _MONOSCOPE_H

#include <glib.h>
#include "convolve.h"

#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