summaryrefslogtreecommitdiffstats
path: root/gst/playondemand/demo-mp3.c
diff options
context:
space:
mode:
authorLeif Johnson <leif@ambient.2y.net>2003-07-19 23:17:57 +0000
committerLeif Johnson <leif@ambient.2y.net>2003-07-19 23:17:57 +0000
commitd5c716edbd09cbb187ffec03b6855e59a6e96c11 (patch)
tree0bf2774d8b59ab114305d242a2f1e88cb26ab43b /gst/playondemand/demo-mp3.c
parent90ec1eb6528f2bb1abcdcb4d4837426d0c7d915a (diff)
downloadgst-plugins-bad-d5c716edbd09cbb187ffec03b6855e59a6e96c11.tar.gz
gst-plugins-bad-d5c716edbd09cbb187ffec03b6855e59a6e96c11.tar.bz2
gst-plugins-bad-d5c716edbd09cbb187ffec03b6855e59a6e96c11.zip
+ attempting to fix up playondemand ... still makes nasty crackly noises
Original commit message from CVS: + attempting to fix up playondemand ... still makes nasty crackly noises
Diffstat (limited to 'gst/playondemand/demo-mp3.c')
-rw-r--r--gst/playondemand/demo-mp3.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gst/playondemand/demo-mp3.c b/gst/playondemand/demo-mp3.c
index e239961d..7161aae4 100644
--- a/gst/playondemand/demo-mp3.c
+++ b/gst/playondemand/demo-mp3.c
@@ -10,7 +10,7 @@ GtkWidget *play_button, *clear_button, *reset_button, *quit_button;
GtkWidget **beat_button;
GtkWidget *speed_scale;
GtkObject *speed_adj;
-GstElement *src, *mad, *pod, *sink, *pipeline;
+GstElement *src, *mad, *conv, *pod, *sink, *pipeline;
GstClock *element_clock;
guint32 *beats;
@@ -63,6 +63,7 @@ beat (GtkToggleButton *button, gpointer data)
void
speed (GtkAdjustment *adjustment, gpointer data)
{
+ g_signal_stop_emission_by_name(G_OBJECT(pod), "deep-notify");
g_object_set(G_OBJECT(pod), "tick-rate", adjustment->value, NULL);
/*gst_clock_set_speed(element_clock, adjustment->value);*/
}
@@ -72,11 +73,12 @@ setup_pipeline (gchar *filename)
{
src = gst_element_factory_make("filesrc", "filesrc");
mad = gst_element_factory_make("mad", "mad");
+ conv = gst_element_factory_make("audioconvert", "audioconvert");
pod = gst_element_factory_make("playondemand", "playondemand");
sink = gst_element_factory_make("alsasink", "alsasink");
g_object_set(G_OBJECT(src), "location", filename, NULL);
- g_object_set(G_OBJECT(sink), "period-count", 32,
+ g_object_set(G_OBJECT(sink), "period-count", 64,
"period-size", 512, NULL);
g_object_set(G_OBJECT(pod), "total-ticks", NUM_BEATS,
"tick-rate", 1.0,
@@ -86,8 +88,8 @@ setup_pipeline (gchar *filename)
pipeline = gst_pipeline_new("app");
- gst_bin_add_many(GST_BIN(pipeline), src, mad, pod, sink, NULL);
- gst_element_link_many(src, mad, pod, sink, NULL);
+ gst_bin_add_many(GST_BIN(pipeline), src, mad, conv, pod, sink, NULL);
+ gst_element_link_many(src, mad, conv, pod, sink, NULL);
element_clock = gst_bin_get_clock(GST_BIN(pipeline));
gst_element_set_clock(GST_ELEMENT(pod), element_clock);