On Sun, Aug 19, 2012 at 12:48:40PM +0200, Daniel Narvaez wrote: > On 19 August 2012 09:02, Aleksey Lim <alsr...@sugarlabs.org> wrote: > >> I still think returning an arbitrary > >> size buffer is wrong and should be fixed at some point. > > > > The original buffer size should not matter, if I got gst docs right, > > only `offset` and `size` does matter > > http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#gst-buffer-new-wrapped-full > > > > That's my understanding too. But we are not passing gst_espeak_create > size as size to gst_buffer_new_wrapped_full, because of this > > switch (g_atomic_int_get (&self->track)) { > case ESPEAK_TRACK_WORD: > case ESPEAK_TRACK_MARK: > size_to_play = events (self, spin, size_to_play); > break; > default: > size_to_play = whole (spin, size_to_play); > break; > }
Yeah, that might be a problem. In any case, that seems to work in gst-0.10/1.0. I don't want fixing this issue in current code, it is overbloated with design that was not fully implemented and seems to be an overkill at the end (it was a try to process continues synch, but, it seems to be more reasonable to process text synch separated with gst stop/start sessions). I started "simplify" branch for that reason. > >> >> gst-launch-1.0 espeak text="Hello world" ! autoaudiosink > > > > I compiled gst from git and got broken `autoaudiosink` behaviour. For > > example > > > > gst-launch -v -m audiotestsrc ! audioconvert ! audioresample ! > > autoaudiosink > > > > fails with the same error as > > > > gst-launch-1.0 espeak text="Hello world" ! autoaudiosink > > > > So, it seems to gst development code fails. > > I have a few days old gstreamer tree where autoaudiosink seems to be > fine. I need to apply the following to make espeak work though (it was > in my patch, > http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038891.html). > Can we get this in? > > diff --git a/src/gstespeak.c b/src/gstespeak.c > index 4560512..1dd097e 100644 > --- a/src/gstespeak.c > +++ b/src/gstespeak.c > @@ -152,7 +152,7 @@ static void gst_espeak_init (GstEspeak * self) { > "rate", G_TYPE_INT, espeak_get_sample_rate (), > "channels", G_TYPE_INT, 1, NULL); > > - gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_DEFAULT); > + gst_base_src_set_format (GST_BASE_SRC (self), GST_FORMAT_TIME); > } > > static void gst_espeak_finalize (GObject * self_) { Original intention was a try to have bytes buffers, but it seems something that something was implemented wrong. Time buffers seems to work better, so I' pushed this code. -- Aleksey _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel