pause_node() will check the IDLE state of the node and will not
deactivate the node when suspending when it was already IDLE.
Fixes an issue where node.pause-on-idle=false filters would not want to
resume after a suspend.
If we try to fetch a property as some specific type and the parsing
fails, log a warning. This should catch any client bugs where the
properties are set wrongly.
Two method calls to get properties,
- pw_properties_fetch_$type()
- pw_properties_get_$type()
The former allows for easy error checking and conditional setting of
properties. The latter for easy fetching of a property with a default
value. This simplifies the code and makes property parsing behave more
consistently across the code base.
Before:
str = pw_properties_get(props, "foo");
if (str)
myval = pw_properties_parse_int(props, str);
if (myval == 0) /* parsing error or a valid zero */
do_stuff(myval);
Now:
if (pw_properties_fetch_int32(props, "foo", &myval) == 0)
do_stuff(myval);
If we build media-session before the daemon we have the executable
variable available and can rely on meson to fill in the path instead of
handling it manually.
There are only two values we care about that are identical, we can
re-set those in a new configuration_data() object.
All the other values set by the pipewire daemon are related to how we
start the session manager which isn't applicable here.
When pause-on-idle is false, the node can be destroyed without ever
being deactivated, which would crash. Make sure we deactivate in destroy
and remove the node from the graph.
The previous code exposed a race condition, it assumed that our MARK
message was in the next lot of messages by the journal. If something
else would write to the journal in the meantime and our message took
time to arrive, the test would fail.
Fixes#1710
Valgrind tests are running under different conditions than normal tests,
specifically they all run in the same process rather than running one
fork per test. This means one test can affect another test's result if
the test doesn't clean up propertly.
This makes them harder to debug from the logs, so let's give us a
fighting chance by having debug logging enabled.
When running meson test without a preceding ninja build, we end up with
missing libraries. This somehow happened to work until recently but now
it triggers an issue with libspa-dbus.so not being available during the
valgrind test run, causing a test case to fail.
Add a method to enable/disable the denormals flush-to-zero and
denormals-as-zero CPU options.
Add a config option to make it possible to disable this again.
Fixes high CPU usage when dealing with denormals, which can happen
in many DSP functions.
Fixes#1681
AUX channels can link to any other channel but when AUX channels are
linked, they must match exactly.
Fixes some issues with split devices with aux channels.
The docs are slightly ambiguous here but it appears a call to
sd_journal_next() is required at least once before the actual data
message.
journalctl positions the cursor with sd_journal_seek_tail() followed by
sd_journal_seek_previous(). The actual enty is then fetched with
sd_journal_next().
Let's do the same here and let's hope this fixes the current race
condition with the test sometimes failing.
Some devices (Bose Mini Soundlink II, Air 1 Plus, ...) don't enable
AVRCP volume control, or fail to enable it before a hardware button is
pressed. However, these devices appear to enable it, if an AVRCP player
is present.
As a workaround, register a dummy AVRCP player for each adapter. It only
displays the current transport acquisition state as playing/stopped, but
just its presence appears to be enough to make devices behave.
Multiple AVRCP players interfere with each other, as BlueZ uses the one
registered earliest as the default player. So add also a config option
for disabling this. (It's not common to have mpris-proxy etc. running,
so defaulting to true should be OK.)
See pipewire#1157
Debugging is easier if we can explicitly run a single iteration only.
This filter could be a range but for now it's sufficient to be able to
run a single test only.
Take some parts out of the public documentation, add a lot of internal
documentation to make it easier for the next person to figure out how
this works.
The use of static inline prevents doxygen from generating docs, put a
note in to link to the header file directly.