[Live-devel] doGetNextFrame interval

Ross Finlayson finlayson at live555.com
Thu Oct 9 21:25:14 PDT 2014


> In my AudioBufferSource (based on AudioInputDevice) the doGetNextFrame happens at an extremely fast interval - which is sometimes causing my PCM audio running at 44.1 kHz to get fragmented. 

The frequency at which "doGetNextFrame()" gets called depends entirely on the value that you set for "fDurationInMicroseconds".  If you set this appropriately
	i.e., fDurationInMicroseconds = (numSamplesDelivered*1000000)/samplesPerSecond
then "doGetNextFrame()" will get called at the appropriate frequency.

Alternatively, if you leave "fDurationInMicroseconds" at its default value of zero, then "doGetNextFrame()" will get called again immediately after you complete delivery of the previous frame, but that's OK, provided that you don't actually complete the delivery (i.e., call "FramedSource::afterGetting()") until you have accumulated however many samples you want to deliver each time.  (Of course, you shouldn't 'block' or 'spin' waiting for this to happen.)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20141009/438067d1/attachment.html>


More information about the live-devel mailing list