GNOME Bugzilla – Bug 722397
liveadder: handle gap buffer flag
Last modified: 2014-06-03 19:00:33 UTC
Created attachment 266528 [details] [review] patch Otherwise some buffers will be pushed downstream with the gap flag still set and e.g. a following volume only changes the volume of some buffers.
Should probably only unset the GAP flag is neither buffer is a gap buffer..
It seems to make sense to me, as GAP buffers should only contain silence and can be ignored for liveadder context.
Oliver: I don't think so. What must happen is this: - 'oldbuffer' is the current buffer that will be sent downstraem later. - 'buffer' is the new data that should be added. If 'buffer' has the GAP flag set, then we just do nothing. If it doesn't, then things get interesting: If 'oldbuffer' doesn't have the GAP flags set, then we can just add the data and everything works just fine. If 'oldbuffer' the GAP flag set, its data must be zero, so adding works just fine. However we must remove the GAP flag, or downstream may ignore the data we just added. This is an adder, so the we can only sent a GAP buffer if _all_ input buffers are GAP buffer.
@Michael: Makes sense. We probably want to add the case where oldbuffer has the gap flag set, then we can avoi adding and just replace oldbuffer with buffer. for the relevant portion. Merged Author: Michael Olbrich <m.olbrich@pengutronix.de> Date: Mon Oct 14 16:14:42 2013 +0200 liveadder: handle gap buffer flag Remove GAP flag unless both sides have gap data, ignore incoming data if it is gap data. https://bugzilla.gnome.org/show_bug.cgi?id=722397