GNOME Bugzilla – Bug 618409
jackaudiosrc: improve process callback
Last modified: 2010-05-13 11:00:38 UTC
Created attachment 160866 [details] [review] Proposed patch jackaudiosrc should not use g_alloca in its process_cb as it is only used here to enhance readability. Additionally, the process_cb should interleave samples directly from the jackports into the ringbuffer and not into an intermediate memory buffer.
Created attachment 160867 [details] [review] improves jack process callback
Created attachment 160906 [details] [review] advance the ringbuffer as we copy samples We should also advance the ringbuffer as segments are copied over, not just once in the process callback but everytime we copy over more than the length parameter given by the gst_ringbuffer_prepare_read call.
(In reply to comment #2) > Created an attachment (id=160906) [details] [review] > advance the ringbuffer as we copy samples > > We should also advance the ringbuffer as segments are copied over, not just > once in the process callback but everytime we copy over more than the length > parameter given by the gst_ringbuffer_prepare_read call. I commited the following patch instead. Just like in the sink case, the number of frames is always exactly equal to the size we get from the prepare_read call or else something else is wrong. commit d4f6a94b93291d36fd3658d790869f757187df05 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Thu May 13 12:55:29 2010 +0200 jacksrc: make sure we always read nframes Error out when we are asked to read a different size that what was configured as the jack period size because that would mean something else is wrong. Fixes #618409
Comment on attachment 160867 [details] [review] improves jack process callback >From: Tristan Matthews <tristan@sat.qc.ca> >Subject: [PATCH 1/1] jack: improve process_cb A more meaningful commit message would've been nice ;-)