<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">After playing around with this for about 6 hours, I found some interesting data.  The latency on the g722 (since renamed to ip_mcast) null-sink hovers around 20mS when I have pavucontrol running, and around 600mS when I don’t have it running.  Since G722 requires pretty consistent 20Ms packets, this is certainly the problem.  The max request size is also obviously different.  Is it possible to adjust the max request size?  That is the only thin gI can think of that would really impact the latency here.<div class=""><br class=""></div><div class="">Thanks again,</div><div class="">Travis</div><div class=""><div class=""><br class=""></div><div class=""><div class="">Good:</div><div class="">    index: 2</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>name: <ip_mcast></div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>driver: <module-null-sink.c></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY</div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>state: IDLE</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>suspend cause:</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>priority: 1000</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>volume: mono: 65536 / 100% / 0.00 dB</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>        balance 0.00</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>base volume: 65536 / 100% / 0.00 dB</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>volume steps: 65537</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>muted: no</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>current latency: 20.63 ms</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>max request: 1 KiB</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>max rewind: 1 KiB</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>monitor source: 3</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>sample spec: s16le 1ch 16000Hz</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>channel map: mono</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>             Mono</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>used by: 0</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>linked by: 1</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>configured latency: 40.00 ms; range is 0.50 .. 2000.00 ms</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>module: 4</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>properties:</div><div class=""><span class="Apple-tab-span" style="white-space:pre">               </span>device.description = "ip_mcast"</div><div class=""><span class="Apple-tab-span" style="white-space:pre">         </span>device.class = "abstract"</div><div class=""><span class="Apple-tab-span" style="white-space:pre">               </span>device.icon_name = "audio-card”</div><div class=""><br class=""></div><div class="">Bad:</div><div class=""><div class="">  index: 2</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>name: <ip_mcast></div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>driver: <module-null-sink.c></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY</div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>state: IDLE</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>suspend cause:</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>priority: 1000</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>volume: mono: 65536 / 100% / 0.00 dB</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>        balance 0.00</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>base volume: 65536 / 100% / 0.00 dB</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>volume steps: 65537</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>muted: no</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>current latency: 657.77 ms</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>max request: 62 KiB</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>max rewind: 62 KiB</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>monitor source: 3</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>sample spec: s16le 1ch 16000Hz</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>channel map: mono</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>             Mono</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>used by: 0</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>linked by: 0</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>configured latency: 2000.00 ms; range is 0.50 .. 2000.00 ms</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>module: 4</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>properties:</div><div class=""><span class="Apple-tab-span" style="white-space:pre">               </span>device.description = "ip_mcast"</div><div class=""><span class="Apple-tab-span" style="white-space:pre">         </span>device.class = "abstract"</div><div class=""><span class="Apple-tab-span" style="white-space:pre">               </span>device.icon_name = "audio-card"</div></div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 24, 2018, at 11:06, Travis Brown <<a href="mailto:travis@bryx.com" class="">travis@bryx.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">  I am using Pulseaudio to send data from an application to 3 different outputs simultaneously: HDMI, analog output and a G.722 RTP stream.   To accomplish this, I set up a null sink call g722 using the following setting in be default.pa:</div><div class=""><br class=""></div><div class="">    load-module module-null-sink sink_name=g722 sink_properties=device.description=“g722”</div><div class="">    load-module module-combine-sink sink_name=combined slaves=alsa_output.pci-0000_00_03.0.hdmi-stereo-extra1,alsa_output.pci-0000_00_1b.0.analog-stereo,g722</div><div class=""><br class=""></div><div class=""> It actually works pretty great.  I use ffmpeg to pull data from the g722 monitor and transcode it and send it out via multicast to the phones/speakers.  </div><div class=""><br class=""></div><div class="">    /usr/bin/ffmpeg -re -f pulse -i g722.monitor -filter_complex aresample=16000,asetnsamples=n=160 -vn -ac 1 -acodec g722 -f rtp <a href="udp://224.0.2.60:50000" class="">udp://224.0.2.60:50000</a></div><div class=""><br class=""></div><div class=""> The issue I am having is that ffmpeg underruns most of the time UNTIL I start pavucontrol.  Starting pavucontrol makes things behave beautifully.  ffmpeg gets a constant stream of data and the audio sounds great.  What I cannot figure out is what pavucontrol is doing to make things better.  It must be setting up something for the VU meters, but I am not sure that would actually improve things, or why it would.  </div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Travis</div><div class=""><br class=""></div></div></div></blockquote></div><br class=""></div></div></body></html>