}
#endif
+static void
+gst_fluidsynth_reset (GstFluidsynth * fluidsynth)
+{
+ fluid_synth_system_reset (fluidsynth->synth);
+ fluidsynth->last_pts = GST_CLOCK_TIME_NONE;
+}
+
static gboolean
gst_fluidsynth_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
fluidsynth->segment);
res = gst_pad_event_default (pad, parent, event);
break;
+ case GST_EVENT_FLUSH_STOP:
+ gst_fluidsynth_reset (fluidsynth);
+ res = gst_pad_event_default (pad, parent, event);
+ break;
case GST_EVENT_EOS:
/* FIXME, push last samples */
res = gst_pad_event_default (pad, parent, event);
goto open_failed;
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
+ gst_fluidsynth_reset (fluidsynth);
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;