A client can sometimes send more data than we requested. PulseAudio
keeps the extra data around, it just asks for more data when it consumed
some of it.
PipeWire however always tries to keep tlength worth of data, as
specified in the PulseAudio docs... Keep track of how much extra data
has been sent and keep this around as well. Make sure we flush this
extra data as well.
Fixes#2626
Although pos will be set to 0 in the first iteration, the compiler does
not seem to figure this out, so help it a little:
../spa/include/spa/support/log.h:306:21: warning: ‘pos’ may be used uninitialized [-Wmaybe-uninitialized]
306 | pos += sprintf(str + pos, "%02x ", buf[i]); \
| ^~
../spa/include/spa/support/log.h:301:13: note: ‘pos’ was declared here
301 | int pos; \
| ^~~
The stream only has one format/enumformat list for the one port it has
so also expose this on the node. We can then remove the adapter for
video.
We can also now show midi (control) streams as the format in pw-top.
Add a column with negotiated formats.
It requires an adapter that will enumerate the port formats so it does
not work for video streams yet.
Fixes#2566
Move the latency fraction calculation to fix_ functions so that the
new latency rate can be used when creating the streams.
Actually set the requested record attributes on the stream instead
of modifying the defaults.
See #2671
3f6fe392 uses headers from /usr/include/lv2/atom/. but this leads compilation
failure for some distros (i.e. ubuntu 18.04) as they have some
different location for these headers. One can find these headers
at /usr/include/lv2/lv2plug.in/ns/ext/atom/ (for ubuntu 18.04)
instead /usr/include/lv2/atom/. So guard them with __has_include.
and mention other possibilities.
Fixes#2670
PulseAudio configures half of the fragsize as the source latency. It
also sends chunks as soon as they become available.
This means that we also need to configure the source with half of
the fragsize latency and send in chunks of fragsize/2. Keep this in
the unused (for record) minreq field.
Make sure all jack nodes from the same pid are in the same group.
It is normally not a problem for different JACK clients to live in
different groups and be scheduled by different drivers with different
quantum and rate.
Some applications (like Carla), however, make multiple clients and
expect all of them to use the same quantum and rate. Enforce this by
adding all jack clients to the application jack group.
When the device is not running but has a format, close/open the
device to get all the available formats again. Do the same when
setting a format.
Otherwise, the configuration space of the device is restricted to the
current negotiated format and we can't query the other possibilities
or change it.
Fixes#2625
could_use_rtkit -> can_use_rtkit.
Only warn when setting nice and there is no rtkit fallback.
Always call set_rtlimit, it does not have an rtkit implementation, if just
has some properties with limits.
Only try to set nice again with rtkit when we required rtkit for some
functions.