The effect is that the null-sink will report the given format in the
Sample Specification, which is what some applications might expect when
they pass a format parameter.
Use a different key than the usual one to select an audio format when we
are fixating a stream format to avoid confusion.
So pulse.fix.rate, pulse.fix.format, pulse.fix.channels are now used to
force a specific format when the stream has the FIX_ stream flags.
Add support for using custom format, rate or channels when the streams
asks to fix those parameters for us.
Some streams might expect to see S16LE when they connect to a sink in
S16LE when the FIX_FORMAT flag is set but this is not the case in
PipeWire because the audio DSP pipeline works in F32, and so F32 is
choosen. Make it possible to use a pulse.rule with a audio.format
property to control this.
Make pw_getrandom() more usable by handling the EINTR case and returning
< 0 when there was an error or not enough random data was available.
Make a new pw_random() function that uses pw_getrandom() but falls back
to a pseudo random number generator otherwise. This pseudo random number
generator is seeded with either data from the urandom source or from the
current time when pipewire is initialized.
In most cases where crytographic security is not required pw_random()
should be easier to use.
This commit implements generating /etc/security/limits.d/20-pw-defaults.conf and
/etc/security/limits.d/25-pw-rlimits.conf files. The numbering is arbitrary and
may very well warrant being in the reverse order, however `man 5 limits.conf`
does not appear to specify the parsing order or even say exactly how multiples
matches will resolve, so the value can be adjusted later, if required.
The actual limit values, the match rule and even whether each file is to be
installed can be changed via the build system before compilation. Likewise
the files can be modified or (re)moved during distro package building phase.
The 20-pw-defaults.conf should only be installed on legacy systems lacking both
a modern kernel and up to date systemd, because all it does is set the current
Linux default. Accordingly its not installed by default.
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
Use the timestamps directly as the ringbuffer index. We can save some
conversions to bytes and there is a direct mapping to RTP timestamp,
clock position and ringbuffer index.
Simplify the source a little. Remove the buffering state, we always
start with read and write pointers separted by the target buffering.
Always write to index of the clock, not just for the first packet.
This ensure the timestamp on the packet always matches the time it was
processed in the graph.
Always use the timestamp of the graph clock for RTP packets. Add an
option to apply a random or fixed offset.
Add a ts-refclk option on the sender to specify a reference clock to
use for timestamping. This will activate the direct timestamp mode and
signal this in the SDP.
Parse ts-refclk and ts-offset from the SDP. Make it possible to match
them in rules. Add option to activate the direct-timestamp, where the
rate matching is disabled and the timestamps are used directly for
writing and reading from the ringbuffer using the graph clock.
This makes it possible to set a PTP clock on sink and source and avoid
rate matching by using a shared clock.
Use the control changes to load a new IR, then signal to data thread to
use the new IR. In the data thread, signal the main thread to free the old
IR after we swapped it out.
THis moves all allocations from the data thread into the main thread.
SOFA is a file format used for storing and accessing spatial audio data, namely head-related transfer functions. These can be used to create binaural spatial sound using head- or earphones.
This commit introduces libmysofa as an optional dependency for loading SOFA files and creates a spatializer plugin for the filter-chain
ci: install libmysofa-devel for full build
ci: bump FDO_DISTRIBUTION_TAG
Try to keep half the packet size in the ringbuffer as well. This helps
us adapt to the packet size of the sender.
Drop samples from the ringbuffer for the first packet we read. This
makes us lock onto the stream with the exact requested latency.