Instead of using a new macro with the `PW_` prefix, simply define
`SCHED_RESET_ON_FORK` to be `0` when it is not defined; as the
prefixed variant can be a bit confusing.
Reset buffers when deactivating to avoid having old data in the
ringbuffers, which also adds latency when activated again.
Clear sink_ready and capture_ready when resetting buffers to avoid
calling process() before there is new data to process.
capture and sink streams may start before playback stream so process()
may fail to dequeue a playback buffer. In that case advance the read
pointers to avoid building up latency in the ringbuffers.
Make sure we safely stop draining the stream by using the loop lock.
Always stop draining when we change the state of the stream.
The idea is that you either wait for the drain signal or cancel the
pending drain early with a new set_active() call.
When the properties of an object change, update the properties on the
global as well. There is no way to notify clients of a changed global
but they are supposed to listen to the object specific events for that.
The global properties are meant to be a snapshot at the time of
enumerating the registry and can change later.
Add type info to variables. This way we can avoid doing things on
variables of the wrong type.
Add a list-vars command to list the currently registered variables and
their type.
Fixes#4746
The filter detects unnatural gaps (consisting of 0.0 values) and will
ramp-down or ramp-up the volume when entering/leaving those gaps.
This makes it filter out the pops and clicks you typically get when
pausing and resuming a stream.
See #4745
Now that the stream remembers the latency for us, we can only care
about the other latency.
So, if we get (output) latency on an input port/stream, we add our
own latency and then set it on the output port/stream. We do the
same for input ports.
LOCK the Latency param we get from the peer so that we don't remove it
when we update our own port latency. Also don't remove our port latency
when we get an update from the peer.
This essentially keeps the update/clear of the upstream and downstrem
latencies separate and makes it easier to implement the latency
logic in the pw-stream.
When a filter receives a Latency event on a port, it can simply update
the other port latency and none of the peer latencies are removed.