[Bug 703901] The output audioecho got bad if delay value got changed when playing or paused
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Jul 10 00:30:05 PDT 2013
https://bugzilla.gnome.org/show_bug.cgi?id=703901
GStreamer | gst-plugins-good | 1.0.5
Sebastian Dröge <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #248773|none |needs-work
status| |
--- Comment #1 from Sebastian Dröge <slomo at circular-chaos.org> 2013-07-10 07:30:01 UTC ---
Review of attachment 248773:
--> (https://bugzilla.gnome.org/review?bug=703901&attachment=248773)
::: audioecho.c.old
@@ +204,3 @@
}
+
+ //Reset the buffer and update delay frame number if delay value has
changed.
Please use normal C comments /* */
@@ +206,3 @@
+ //Reset the buffer and update delay frame number if delay value has
changed.
+ rate = GST_AUDIO_FILTER_RATE (self);
+ self->delay_frames = MAX (gst_util_uint64_scale (self->delay, rate,
GST_SECOND), 1);
You should check that the delay is smaller/equal to max-delay. Otherwise the
buffer will be too small and it will crash
@@ +207,3 @@
+ rate = GST_AUDIO_FILTER_RATE (self);
+ self->delay_frames = MAX (gst_util_uint64_scale (self->delay, rate,
GST_SECOND), 1);
+ self->buffer_pos = 0;
Resetting the buffer position should cause a short distortion whenever you set
a different delay. Why is that necessary?
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list