[Shtoom] new playout patch: it, um, doesn't suck

Zooko O'Whielacronx zooko at zooko.com
Tue Feb 22 21:54:00 CET 2005


So I did the "if on darwin use ridiculous playout buffer depth" hack, 
as described in my previous mail.

The result, appended here, is okay at playout on both Mac and Linux.  
However, the result here *sends* RTP packets at a bad rate on Mac.

That is, it sends 20-ms PCMU packets at a rate of 40 of them per 
second.  Bad.

I did some experimentation, and SVN HEAD of Shtoom currently sends a 
proper rate -- 50 packets per second -- but sometimes with short 
contents -- less than 160 bytes of mulaw-encoded audio in each packet.

With SVN HEAD of Shtoom on Mac, sending to SVN HEAD+playout.patch on 
Linux, I get high latency in long call.

With SVN HEAD+playout.patch on Mac and on Linux, I get choppy, ugly 
audio as the playout on Linux underruns frequently since it isn't 
receiving enough packets.  Note that the playout patch includes putting 
a small buffer in the media encoder to buffer enough bytes for a 
standard media frame, so it guarantees no funny-sized PCMU packets.

My proprietary branch of Shtoom has some refactored Mac audio work, and 
it sends PCMU packets at a good rate and with 160 bytes per packet.  
With that sending from Mac, the Linux playout sounds good!

So: you can apply this patch if it works for you.  I will, tomorrow, 
work up a patch that contributes our Mac audio refactoring (largely due 
to Donovan Preston).

Regards,

Zooko

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: playout.patch.txt
URL: <http://mail.python.org/pipermail/shtoom/attachments/20050222/4866a10b/attachment.txt>


More information about the Shtoom mailing list