RAOP, pavucontrol and general "Latency offset"

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

 



Hello,

While working on the previously posted patch, I've noticed (it was
about time!) a little "Advanced" section in my internal sound card's
Output Device entry in pavucontrol. Clicking it I discovered a
latency offset setter.

I thought that would be ideal to have that in RAOP sinks too, and
started investigating why it's grayed out on the RAOP sink Output
device entry.

I discovered that the sink needs to have one or more "ports" for that,
and added one to raop-sink, which enabled the Advanced section in
the RAOP sink in pavucontrol.

But changing the setting did nothing, and after lots of gdb breakpoint
setting, I noticed that in the method DeviceWidget::onOffsetChange() of
pavucontrol, we return early because offsetButtonEnabled == false.

This is because offsetButtonEnabled is set to false when the
deviceWidget is constructed, and then set to true later when
DeviceWidget::setLatencyOffset() is called. It's called from 
mainwindow.cc::updatePorts() only if ports.find(w->activePort) !=
ports.end().

I'm not sure I understand correctly, but it looks like to me
setLatencyOffset() is only called if the sink has more than one port?

I would love if someone could enlighten me: did I understand the
pavucontrol code correctly? Is there a reason for that or does that
look like a bug? 

Ideally, if I manage to finish that patch, I'd plug the RAOP latency
offset into sink->port_latency_offset, and the value would show in
pavucontrol, and it would be changeable at runtime.

Thanks a lot in advance!
-- 
Colin


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

  Powered by Linux