React immediately to "bad" buffer level. Use smaller bitrate
increments/decrements. Fix ABR timer increment for fragmented packets.
Handle actual bitrate being smaller than target during silence.
When the `client` argument is NULL, return a zero initialized
`pthread_t` object from `jack_client_thread_id()`. Returning
`-EINVAL` can be problematic because even though `pthread_t` is
a typedef for `unsigned long` in glibc, it is still a pointer,
not a numeric identifier. And in musl, it is a typedef to a
pointer, which results in a warning:
In file included from ../spa/include/spa/support/cpu.h:34,
from ../pipewire-jack/src/pipewire-jack.c:40:
../pipewire-jack/src/pipewire-jack.c: In function 'jack_client_thread_id':
../spa/include/spa/utils/defs.h:274:11: warning: returning 'int' from a function with return type 'jack_native_thread_t' {aka 'struct __pthread *'} makes pointer from integer without a cast [-Wint-conversion]
274 | return (val); \
| ^
../pipewire-jack/src/pipewire-jack.c:3775:2: note: in expansion of macro 'spa_return_val_if_fail'
3775 | spa_return_val_if_fail(c != NULL, -EINVAL);
Init the compat types map a little earlier so that it is initialized
when we try to clear it on error.
Add the client listener earlier so that we can use the events to clean
up the map, source and connection.
Only simple upmixing would replicate the FC channel into REAR/SIDE.
The PSD method would take the diff between FL/FR (which would
be 0 if only FC is available) and not generate output.
For a JACK client, the context and node is the same. It makes sense to
also run the rules on the context properties so that application
name etc. can be matched as well.
Fixes#2580
The loop invoke method will already call the function directly when the
thread has been stopped and will also make sure that pending items are
flushed first.
See #2631
We set the node port io when we negotiate buffers on the port but never
unset it.
With this patch, the port io is cleared again when no mixers are on the
port. This can make the node a bit more efficient.
Read the .conf.d/ override files in the same order as the .conf files.
If we already have a .conf override file with the same name, it was one
with a higher priority and we ignore it.
This makes it possible to place a 10-rates.conf file in ~/.config that
will override a 10-rates.conf file in /etc and /usr/share.
Fixes#2629
Allows placing override configuration files into a different directory. This is
Useful when pipewire clients such as wireplumber want their fully commented
configuration files under /etc/wireplumber, and fully uncommented configuration
files under /usr/share/wireplumber.
The point is solving the issue of users copying files from /usr/share/pipewire,
which contain various critical settings in addition to tweaking the config,
and then encountering problems at upgrade time when new critical settings are
added.
Always use the DSP rate on DSP ports for format conversion, not the
previous used rate.
This avoids some resampler reconfiguration as it negotiates a non-passthrough
rate conversion and then switches to passthrough when the rate correction is
done to match the graph rate.
See #2614
Some Flatpak apps want to manage sound fully (change default outputs,
move streams from other applications). Real Pulseaudio always grants
full permissions, but pipewire-pulse doesn't, which breaks some
applications, e.g. Zoom.
Work around this by granting the manager permission if the application
also has devices=all access.
To do things properly, this probably should use the Portal media roles,
but this would need further work elsewhere.