summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2002-09-16 05:38:53 +0000
committerAndy Wingo <wingo@pobox.com>2002-09-16 05:38:53 +0000
commite229e116ef3e31dac5707882ca4131e160191b50 (patch)
tree95a1fcfac53ba0f9046c93198b73cc3241d7e977 /ext
parentf8262786f438451bc5022922dd1fb24bac32fd7d (diff)
downloadgst-plugins-bad-e229e116ef3e31dac5707882ca4131e160191b50.tar.gz
gst-plugins-bad-e229e116ef3e31dac5707882ca4131e160191b50.tar.bz2
gst-plugins-bad-e229e116ef3e31dac5707882ca4131e160191b50.zip
Some instantiate() routines require nonzero sample rate. ladspa_mbeq (the multi-band eq) is one of these.
Original commit message from CVS: Some instantiate() routines require nonzero sample rate. ladspa_mbeq (the multi-band eq) is one of these.
Diffstat (limited to 'ext')
-rw-r--r--ext/ladspa/gstladspa.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c
index c53c55cc..aa004fdf 100644
--- a/ext/ladspa/gstladspa.c
+++ b/ext/ladspa/gstladspa.c
@@ -429,10 +429,11 @@ gst_ladspa_init (GstLADSPA *ladspa)
}
}
- ladspa->samplerate = 0;
+ /* nonzero default needed to instantiate() some plugins */
+ ladspa->samplerate = 44100;
+
ladspa->buffersize = 64;
ladspa->numbuffers = 16;
- ladspa->newcaps = FALSE;
ladspa->activated = FALSE;
ladspa->bufpool = NULL;
ladspa->inplace_broken = LADSPA_IS_INPLACE_BROKEN(ladspa->descriptor->Properties);
@@ -441,13 +442,8 @@ gst_ladspa_init (GstLADSPA *ladspa)
/* get mode (no sink pads) */
GST_DEBUG (0, "mono get mode with 1 src pad");
- ladspa->newcaps = TRUE;
- ladspa->samplerate = 44100;
- ladspa->buffersize = 64;
-
gst_pad_set_connect_function (ladspa->srcpads[0], gst_ladspa_connect_get);
gst_pad_set_get_function (ladspa->srcpads[0], gst_ladspa_get);
-
} else if (sinkcount==1){
/* with one sink we can use the chain function */
GST_DEBUG (0, "chain mode");
@@ -471,7 +467,7 @@ gst_ladspa_init (GstLADSPA *ladspa)
g_warning("%d sink pads, %d src pads not yet supported", sinkcount, srccount);
}
- gst_ladspa_instantiate(ladspa);
+ gst_ladspa_instantiate (ladspa);
}
static void
@@ -569,6 +565,7 @@ gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GP
case ARG_SAMPLERATE:
ladspa->samplerate = g_value_get_int (value);
ladspa->newcaps=TRUE;
+ gst_ladspa_instantiate (ladspa);
break;
case ARG_BUFFERSIZE:
ladspa->buffersize = g_value_get_int (value);