Make a plugin structure that is dynamically allocated for each plugin
and pass it around to the descriptor instance structures, so that they
all have access to dsp_ops without sharing a static pointer.
The problem with the static pointer is that the dsp_ops structure is
actually allocated in module-filter-chain's instance structure,
so it always points to the instance of the last filter-chain that was
loaded in the process. When this is unloaded, the other filter-chains
crash.
The src can listen to RequestProcess commands and so gets the
node.supports-request = 1 property.
The play-pull example can both be a driver that listens to
RequestProcess or a lazy driver so set this in properties as well.
We can now remove the priority.driver property because automatic
priority selection will make us a driver or not.
With this change, video-src to video-play-pull will use lazy scheduling
with play-pull as the driver. video-play-pull to v4l2src will use
normal scheduling and video-src to video-play will also use normal
scheduling.
Collect the request scheduling flags and when there is a lazy driver,
set the lazy scheduling flag in its clock. This means that the driver
can expect RequestProcess commands to start the scheduling.
Pass the lazy scheduling clock flag to the node.
Make sure lazy scheduling driver have a higher priority than their
request drivers.
Take the current cycle times early and in all cases. We can use this to
get the current frame time for debugging purposes instead of the more
heavy jack_frame_time().
Rate limit the xrun warnings.
So that we can have different versions per FFT.
One possible optimization would be to split the complex number in
separate real and imag arrays. This would speed up the multiply
operations.
When we get a process callback from the capture stream but we can't
trigger the playback stream, simply consume the buffers from the capture
stream.
This can happen when the playback stream is not ready yet, for example.
If we don't consume the buffers that are ready, the converter might run
out of buffers and complain.
The current implementation uses the slope variable S to define the
filter slope. Setting S = 1 results in a constant Q value of
sqrt(2)/2, or 0.7071, which is a good default value.
However, calculating alpha from the Q value instead, as done in
RBJ's cookbook [1], the filter shape can be changed which might
be desired for certain applications and provides flexibility.
Since the current implementation always defaulted to using S = 1,
make sure that configurations missing Q uses the same slope value.
[1] = https://www.w3.org/TR/audio-eq-cookbook/
Client-side bugs calling methods on destroyed proxies like
pw_proxy_ref(p);
pw_proxy_destroy(p);
...
wait for server to ack the remove
...
pw_core_destroy(p->core, p); /* p already removed & destroyed */
should not send messages with the stale proxy id to server.
Set id to SPA_ID_INVALID when removing a proxy from the id map, so that
such client bugs only result to ENOENT.
First make instances of all the plugins and then try to link them up.
Otherwise, depending on the order the plugins are defined in the config,
a link will try to create port data and set it on the instance, which is
still NULL and we crash.
In our current world, it is possible to have a negative delay. This
means that the stream should be delayed to sync with other streams.
The pulse-server sets negative delay and the Latency message can hold
those negative values so make sure we handle them in the helper
functions as well.
Do the delay calculations in pw_stream and JACK with signed values to
correctly handle negative values. Clamp JACK latency range to 0 because
negative latency is not supported in JACK.
We should also probably make sure we never end up with negative
latency, mostly in ALSA when we set a Latency offset, but that is
another detail.
So that a config override can disable the execution of the command by
setting the property to false in the pulse.properties config override.
Expose some conf.c method for this purpose.
Add support for some modules to use a module.$NAME.args config section
to override the arguments of the module. Update the docs.
Add more conditions to the module loading, use !false to also load the
module when the condition is not set and so that we don't have to
explicitly set each condition to true.
Improve module-profiler example config.
Make the xrun reporting as info. This can generate a lot of logging if
the error is persistent and the errors are also reported in pw-top etc.
Fixes#4361
The convolver will parse integers as a sample delay (as before) but will
now also fall back to parsing it as a float in the time domain.
Specifying the delay in time is better because it does not depend on the
samplerate of the graph or the IR.