diff options
author | Richard Boulton <richard@tartarus.org> | 2002-03-03 17:29:59 +0000 |
---|---|---|
committer | Richard Boulton <richard@tartarus.org> | 2002-03-03 17:29:59 +0000 |
commit | b62e08de6e46ceba1e9e908c566e1db4a6e55af9 (patch) | |
tree | c19cdd648e1d528fd796d7deb0acbbded6ac748e /gst/monoscope/monoscope.c | |
parent | 7fb7fcbe868d14b9a24d937ed22c6c18b3025381 (diff) |
Fix monoscope: caps already asked for mono input: make it actually expect such input.
Original commit message from CVS:
Fix monoscope: caps already asked for mono input: make it actually expect
such input.
Diffstat (limited to 'gst/monoscope/monoscope.c')
-rw-r--r-- | gst/monoscope/monoscope.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gst/monoscope/monoscope.c b/gst/monoscope/monoscope.c index 33c3e98d..af942aca 100644 --- a/gst/monoscope/monoscope.c +++ b/gst/monoscope/monoscope.c @@ -25,7 +25,6 @@ #define scope_width 256 #define scope_height 128 -static gint16 newEq[CONVOLVE_BIG]; // latest block of 512 samples. static gint16 copyEq[CONVOLVE_BIG]; static int avgEq[CONVOLVE_SMALL]; // a running average of the last few. static int avgMax; // running average of max sample. @@ -50,7 +49,7 @@ void monoscope_init (guint32 resx, guint32 resy) colors_init(colors); } -guint32 * monoscope_update (gint16 data [2][512]) +guint32 * monoscope_update (gint16 data [512]) { /* Note that CONVOLVE_BIG must == data size here, ie 512. */ /* Really, we want samples evenly spread over the available data. @@ -59,19 +58,14 @@ guint32 * monoscope_update (gint16 data [2][512]) int foo; int bar; int h; - guchar bits[ 257 * 129]; guint32 *loc; int factor; int val; int max = 1; short * thisEq; - for (i = 0; i < CONVOLVE_BIG; i++) { - /* Average the two channels. */ - newEq[i] = (((int) data[0][i]) + (int) data[1][i]) >> 1; - } - memcpy (copyEq, newEq, sizeof (short) * CONVOLVE_BIG); + memcpy (copyEq, data, sizeof (short) * CONVOLVE_BIG); thisEq = copyEq; #if 1 val = convolve_match (avgEq, copyEq, state); |