We always want to clear the provided blocklist from the properties. The
logic tries to only clear when there was a blocklist but it checks this
by comparing the string pointer to the fallback, which gives a compiler
warning.
`getpwuid_r()` puts the strings pointed to from the returned
passwd struct into the specified buffer. Previously, that
buffer technically didn't live long enough to be usable
in the `snprintf()` call - although in practice this didn't
appear to be a problem. A particular version of GCC 11 generates
the same machine code for this function regardless whether
this patch is applied or not. Still, fix this by moving
the buffer to an outer scope.
module-switch-on-connect sets the configured default sink/source
whenever suitable new sink/sources appear.
This should give the same behavior as Pulseaudio's module.
This module exists mainly to provide a workaround e.g. for desktop
environments such as XFCE, whose mixer applications try to manage the
default devices assuming fully PA-like behavior, breaking default
pipewire output switching.
Add a simple quirks table.
Forces S16 formats for teams sink and source info.
Forces removal of the DONT_MOVE flag for capture streams for firefox.
See #838 and #1363
Mark some structures, arrays static/const at various places.
In some cases this prevents unnecessary initialization
when a function is entered.
All in all, the text segments across all shared
libraries are reduced by about 2 KiB. However,
the total size increases by about 2 KiB as well.
If the number of bytes read is not a multiple of the stride,
then partial samples may be queued. Avoid that by storing the
last partial sample (if any) in a separate buffer,
and only queue full samples.
Previously, the code did not set any error code, leaving res = 0,
when the file existed but it wasn't a pipe. This resulted in no
status code being returned to the client.
`sysname` need not be static since `avahi_string_list_add_pair()`
creates a copy, and no other parts of the code have reference to
`sysname` that would require static lifetime.
Furthermore, do not hardcode the size of the array.
The node.link-group property marks streams that are internally linked
together in some way. It is used to relate the input and output streams
of some of the module streams.
Several places in the code don't handle reconnecting DBus connections
yet. In those cases, a ref to the DBusConnection handle needs to be
kept, so that there's no use-after-free if it gets freed by spa_dbus
if the connection is broken.
Adjust spa_dbus so that others keeping additional refs is safe.
When a sink is RUNNING but there is nothing linked to the input it must
be the monitor that is keeping it active, report IDLE for the sink in
that case.
When a source is RUNNING but there is nothing linked to the output it
must be the sink part that is keeping it active, report IDLE for the
source.
Fixes#1345