Colin,

Attached is a git format-patch for the socket size handling change. It simply 
removes the call to setsockopt so that the OS determined value (taken from the 
sysctl parameters) is used unchanged. The default values used in typical Linux 
distributions should be OK, though a user can always change this using sysctl 
-w. 

After looking further into the fmtp parameter operation I found that it did not 
change the receive window size used, therefore I made no changes in this area. 
There were small differences in the average steady-state windowing values used 
when this parameter was changed, but in all cases the same window size of 
approx 100k was used.

> Sounds good. Thanks very much for looking at this stuff :)
> I'm always
> happy to see people improve on the base I created (it
> certainly has
> plenty bits that need improving :D)

Glad to help out - I found the instructions on your blog for building and 
testing pulseaudio very useful. 

One minor point - when I built from rpm source, I was able to find the external 
package dependencies (rpm -qpR) easily. When using git I found that I needed to 
manually install some extra JSON devel packages. I'm not that familar with git 
and whether there is an easy way to find out what extra packages are needed, or 
why more packages were needed building from git rather than rpm source, but you 
may want to check into this. 

> Actually I think the video stuff is somewhat simpler... I
> think the
> sender side just sets up a http-esque URL and hands it over
> to the
> player side and tells it "play from here <timestamp>"
> and that's it.
> Whereas the audio side is still very much a push system.
> 
> Not sure on the logic of that, but I guess it's just a time
> + long term
> playback (e.g. > 1 item) thing. But that said, I've not
> looked too much
> at the "AirPlay" stuff (I appreciate the term AirPlay
> encompasses the
> AirTunes stuff which used to be separate).

Yes AirPlay was renamed since iTunes is no longer needed - there are now 
iPad/iPhone apps that can stream directly to an AirPlay device, though I 
haven't tried this out yet. It will be interesting to see if AirPlay actually 
becomes a de facto standard supported by most CE devices - DLNA has been around 
for years but has not been that successful.

Regards,
Bryan
From 23f723af4e6700c7e08dc9557d24bd4e2c63ff03 Mon Sep 17 00:00:00 2001
From: Bryan Gleeson <[email protected]>
Date: Fri, 10 Jun 2011 13:02:20 -0700
Subject: [PATCH] Signed-off-by: Bryan Gleeson <[email protected]>

Change socket buffer size handling to avoid playback underruns

When a TCP socket is created the size of the send buffer (SO_SNDBUF) used is 
determined by the OS, using the net.ipv4.tcp_wmem sysctl parameter. Previously 
a call to setsockopt set the buffer size to a value that was too small, and 
that in some cases could result in underruns and choppy playback. This 
setsockopt call has now been removed so that the value determined by the OS is 
used unchanged.

Note that the value used for the send buffer size is the 2nd value in 
net.ipv4.tcp_wmem, e.g. if this is set to "4096 65536 8388608" the send buffer 
size is set to 65536.
---
 src/modules/raop/raop_client.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/modules/raop/raop_client.c b/src/modules/raop/raop_client.c
index 05c7b16..f85188f 100644
--- a/src/modules/raop/raop_client.c
+++ b/src/modules/raop/raop_client.c
@@ -220,7 +220,6 @@ static void on_connection(pa_socket_client *sc, 
pa_iochannel *io, void *userdata
     c->fd = pa_iochannel_get_send_fd(io);
 
     pa_iochannel_set_noclose(io, TRUE);
-    pa_iochannel_socket_set_sndbuf(io, 1024);
     pa_iochannel_free(io);
 
     pa_make_tcp_socket_low_delay(c->fd);
-- 
1.7.3.4

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to