Help with code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all, hope this is the correct place to ask.

I've written some code to distribute 8 channels of 22.05khz mono audio
over a network via UDP broadcast.

The receiver decodes packets and sends them to 8 connections to pulse
audio via pa_simple_write.

My problem is simple(ish).  Sometimes on some clients the reported
latency creeps up, read via (pa_simple_get_latency).

In order to try and bring the latency back down I've tried dropping
packets and not sending to pa_write for a while as well as various
combinations of pa_simple_flush.

My question is two part.

1) What is the blocking arrangement for applications?  Can I ask pulse
if a stream is full before I commit to a pa_simple_write ? sometimes my
main loop (get latency, write) slows down to a crawl.  strace -c reveals
a lot of time spent in some futex thingi I don't pretend to understand.

2) Once latency has crept up can I force it back down?, i've tried
pa_simple_free but the latency remains the same.  Im guessing pulse has
let the playback buffer size creep up, but I need it wound back down
even at the cost of glitching.

I'd like to avoid the full API if possible, but if needs must.

Any help gratefully received.

Thanks,
Jon




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux