The flag means that the process function might not complete
synchronously.
We can use this knowledge to improve the adapter. In sync mode we
can pull before scheduling the converter. In async mode we need to
schedule the follower after the converter to get the data ready for
the next iteration.
We can also improve the stream when it is operating async to schedule
a process call when a new buffer is ready to be filled.
This reduces a cycle latency from alsa and improves latency in
pulse.
Only try to reuse a buffer when the io area is not already in
the NEED_DATA state or else we might overwrite a previous buffer
reuse and run out of buffers.
We also always need more input.
For now, let's lower our priority in device reservation below that of
PulseAudio (which currently uses a priority of 0), so that it takes
priority while contending for the same device.
Make sure the default node as the highest priority.
Fixes a problem with default nodes not being selected when their
priority happens to be too low (bluetooth devices)
A passive node can still be the fallback node. It becomes non-passive
if there is a node assigned to it.
This makes the Dummy node work again in the case of jack clients
that always need to be scheduled.
When we destroy the proxy we should either take the thread lock
or stop the thread loop because the destroy might trigger a reply
to remove the object from another thread. This can cause the
refcounting to become invalid and cause double free.
Fixes#286
Currently pipewire-media-session uses ~/.pipewire-media-session for
storing configuration. Use home directory as specified by XDG base
directory specification viz. XDG_CONFIG_HOME and fall back to using
a default of $HOME/.config as per the spec if XDG_CONFIG_HOME is not
set or empty. Also in addition, all cases are now handled the same
and always end up using "%s/.config/pipewire-media-session".
If neither XDG_CONFIG_HOME or HOME are set, fall back to the earlier
approach.
Fixes: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/271
Signed-off-by: Sanchayan Maity <sanchayan@asymptotic.io>
Fixes!298
The __x86_64__ macro identifies a CPU family, and is unfortunately not
enough to identify a concrete ABI.
The normal x86_64 ABI that is used by practical Linux distributions is
LP64 (i.e. 32-bit int, and 64-bit long and pointer), and defines
__x86_64__ and __LP64__.
x32 is a niche ILP32 ABI (i.e. 32-bit int, long and pointer) for x86_64
CPUs, which has different struct sizes due to sizeof(long) and
sizeof(void *) being smaller. It defines __x86_64__ and __ILP32__.
Signed-off-by: Simon McVittie <smcv@debian.org>
Don't say that there is no runtime directory set when there is but
the server is not running.
Simplify things by first trying to connect to the user runtime directory
when set and then try the system directory. There is no need to manually
check the existance of the socket, connect wil that that and set the
appropriate error.
Add /run/pipewire to the list of runtime directories so that clients can
connect to the system service without specifying runtime directory.
If the otherwise chosen directory (e.g. the user home directory) doesn't
contain any socket but /run/pipewire does, the latter will be used.
Add system service and socket in addition to the user service and
socket. The system service is started as pipewire user and group and
clients need to be in the pipewire group to be able to connect.
When we are switching to a target node, force a downmix to the
target channel layout if we can. Don't try to upmix for now and
don't try to mix when the dont-mix flag is set.
This tool detects and fixes common English spelling mistakes, with
generally very few mistakes.
Here is the command I used to generate this commit. There were a few
changes that had to be done manually, and of course adding the ignore
file:
```shell
codespell -I .codespell-ignore -x .codespell-ignore -w
```
I didn’t add it to the CI, but this would be a good place for it.