mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
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.
This commit is contained in:
parent
7fb7fcbe86
commit
b62e08de6e
2 changed files with 3 additions and 9 deletions
|
@ -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);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <glib.h>
|
||||
|
||||
void monoscope_init (guint32 resx, guint32 resy);
|
||||
guint32 * monoscope_update (gint16 data [2][512]);
|
||||
guint32 * monoscope_update (gint16 data [512]);
|
||||
void monoscope_close ();
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue