[gst-devel] const properties during buffer processing

Jan Schmidt thaytan at noraisin.net
Mon May 29 02:25:06 CEST 2006


On Mon, 2006-05-29 at 08:05 +0200, ensonic wrote:
> hi,
> 
> during the weeksend I did a little cleanup on GstVolume [1]. It uses
> multiple processing functions (2) that are switched via function pointers.
> I wanted to add a third one for the volume=0.0 case that uses memset. Now
> the downside of this would be that when one sets volume to zero while a
> buffer is beeing processed the old function would still achie the right
> thing (but be slower). With the next buffer the memset variant becomes
> active and if then one changes the volume back (or unmute) the chenge would
> only become effective for the next buffer.
> 
> A similar roblem already exists in the current code. The int16 variant
> processed the buffer differently wheter volume is greated that 1.0 or less.
> This assumes that this is the case for the full buffer-time. I would like
> to split that into separate functions too and then treat the volume as a
> constant per buffer (read into separate variable before processing block).
> 
> Has anyone an idea of average buffer sizes (e.g. when decoding mp3/ogg)?
> Should volume have an inner loop to process blocks of 1/10th second and
> then update the volume to grant smooth volume changes.
> In buzztard I tune buffersizes of sources to be a fraction of the tempo
> anyway and thus circumvent this problem from the start.

There's no guarantees of buffer sizes, they may be different from call
to call even.

Personally, I'd prefer to see volume run smaller loops internally and
step the volume size that way, rather than rely on any external
settings.

J.

-- 
Jan Schmidt thaytan at noraisin.net

"Don't Panic" -- The Hitchhiker's Guide to the Galaxy






More information about the gstreamer-devel mailing list