<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - module-http-protocol-tcp: add send buffer size argument"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98368">98368</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>module-http-protocol-tcp: add send buffer size argument
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>modules
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ewtoombs@uwaterloo.ca
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Streaming audio from streams provided by module-http-protocol-tcp is often
impossible over wifi for reasons having nothing to do with sustained connection
speed.

Over wired ethernet,

$ wget -O -
<a href="http://server:4714/listen/source/alsa_output.pci-0000_00_07.0.analog-stereo.monitor">http://server:4714/listen/source/alsa_output.pci-0000_00_07.0.analog-stereo.monitor</a>
<span class="quote">>/dev/null</span >

goes at around 180KiB/s, so that's the speed it needs to go at to sustain the
stream. When I do the same thing over wifi, I only get a speed of around
100KiB/s—not fast enough. I tested this same wifi connection using an HTTP
stream between the same two hosts and got a sustained speed well in excess of
1.5MiB/s, so the wifi is plenty fast enough.

It must be some kind of queueing problem on the pulseaudio server end—probably
send buffer overflows. For instance, I can stream reliably with the following
command run on the remote client:

$ ssh server wget -q -O -
<a href="http://localhost:4714/listen/source/alsa_output.pci-0000_00_07.0.analog-stereo.monitor">http://localhost:4714/listen/source/alsa_output.pci-0000_00_07.0.analog-stereo.monitor</a>
|aplay -f s16_be -c 2 -r 44100

I'd like the option of increasing the size of this sending buffer, so that I do
the same streaming without having to tunnel through ssh. I don't really care
how much of an audio delay this incurs, since synchronisation isn't an issue.
Even if it were, I'd be OK with adding a corresponding delay to the local audio
output to maintain synchronisation. Something like this:

$ pactl load-module module-http-protocol-tcp send-buffer-time=500ms</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>