Try to keep the full docs out of the headers and into the .c file.
A small short blurb in the header is enough for quick lookups.
Also try to use a regular comment to not confuse the doc system.
void* cannot be automatically type-casted so let's do this explicitly.
../spa/include/spa/param/latency-utils.h: In function ‘spa_pod* spa_latency_build(spa_pod_builder*, uint32_t, const spa_latency_info*)’:
../spa/include/spa/pod/builder.h:651:1: error: invalid conversion from ‘void*’ to ‘spa_pod*’ [-fpermissive]
First element is a spa_list, so {{0}} it is.
../spa/include/spa/node/utils.h:98:40: warning: missing braces around initializer for ‘spa_list’ [-Wmissing-braces]
98 | struct spa_hook listener = { 0 };
In file included from spa/tests/test-cpp.cpp:49:
../spa/include/spa/param/latency-utils.h: In function ‘int spa_latency_parse(const spa_pod*, spa_latency_info*)’:
../spa/include/spa/param/latency-utils.h:95:25: error: invalid conversion from ‘int’ to ‘spa_direction’ [-fpermissive]
95 | info->direction &= 1;
| ~~~~~~~~~~~~~~~~^~~~
| |
| int
If pw_array_ensure_size() is called on an array that has not been initialized
with an extend, assert. Otherwise we get stuck in an infinite loop since
doubling our zero allocation size will never reach "need".
Previously, if the string started with any of the characters in
delimiter, the first returned string would've been an empty string.
This is in contrast with the fact that otherwise `pw_split_walk()`
skips empty fields.
E.g.
"::field1::field2" with ":" as `delimiter`
would have resulted in
* ""
* "field1"
* "field2".
Adjust the function to skip leading runs of characters in `delimiter`
by calling `strspn()` first.
Since `pw_split_walk()` does not skip leading runs of
delimiters, if `module_dir` is an absolute path, then
l = pw_split_strv(module_dir, "/", 0, &n_paths);
will return an array of one element, which is exactly the same
as `module_dir`, `strcmp(l[0], module_dir) == 0`.
If `module_dir` is a relative path, then the returned array
still contains a single element, which is, again, the same
as `module_dir`.
Therefore, omit the the call to `pw_split_strv()` and simply
use `module_dir` as is.
On machines with a 32 bits long, converting a negative value will
still result in v == (uint32_t)v and the unit test will fail.
Extend to 64 bits and strtoull to reject negative values in atou32.
The instructions were left a bit broken by
d068cc2bcf because the unistalled script uses
"build" as default and will fail with an "invalid
build directory" error for people following the
guide step-by-step and using "builddir" instead.
bluez5 nodes will always be removed & created again during profile changing, hence
node volume & mute will always be reset. This is OK if profile did changed, because
session manager would carries volume & mute to bluez5 route param. But if profile
was not changed after setting profile (a2dp-sink-sbc -> a2dp-sink -> a2dp-sink-sbc),
session manager would think node volume & mute are not changed and no route
setting is performed, causing route volume out of sync with node volume.
To fix this, we emit node volume and mute right after bluez5 node is created.
Fixes#1254
Mostly uses the existing infrastructure, but the webrtc canceller has a
fixed blocksize, so we:
1. Use the canceller blocksize if configured
2. Accumulate output data in a ringbuffer
3. Push out the data in the required chunk size
This aggregates buffers from the capture stream and the sink in the
corresponding process callbacks, and runs processing based on the
desired resampler rate if there is one.
We allow the ringbuffer in which we capture buffers to grow to some
extent, as that seems to be required for playback to occur smoothly.
Whether this is hiding some other underlying problem likely needs
investigation.
Use _alibpref to check if a device needs a UCM local config. Mark
the device as such and use this to set the OPEN_UCM property on
the device.
Open the UCM for a card when the device has the property set. Use the
same logic for loading the UCM as the acp code.
See #1251
Add env variable PIPEWIRE_NO_CONFIG to disable parsing
custom config files.
Add a method to check extra options.
Expose valgrind, no-config and no-color as options.
UCM devices can require local data from use_case_mgr_open() but since
we do that in a separate process, make sure we reopen the use case
manager in case we are passed a UCM device so that the config is
available.
See #1251
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
Patch generated with concinelle with a few manual fixes.
For boolean properties:
- passing in NULL no longer crashes and instead returns false
- passing in a string starting with 1 (e.g. "1xyz") no longer resolves to true
For int-based properties:
- passing in NULL no longer crashes and instead returns 0
- passing in invalid numbers no longer resolves to whatever number prefix
could be parsed (e.g. "123foo" was 123)
When the server or client goes away, detach the client
from the server to avoid potential use-after-free issues
that might occur if the client causes the
unloading of the server it is connected to.
E.g.:
pactl load-module module-protocol-native-tcp port=4713
pactl -s localhost:4713 unload-module module-native-protocol-tcp
See #1240.