The alias is not a good property to sort on, it contains the object
path and could sort playback_11 before playback_2.
Just group ports of the same node together, then sort by port_id and if
that fails, use the serial number.
See #2260
We can't have a default that simply copies channels, that's just
wrong. So we enable PSD again.
PSD does a good job of moving the ambient sound to the back. It's
subtle and almost stereo like but it's better than plain stereo.
The stereo widen has been reduced to make it more like the simple
upmixing.
People that previously wanted the copy-channels-experience had to
manually enable this in pulseaudio so it's not too much to ask
to manually switch the algoritm to simple. I think this is a better
default.
Fixes#861
See #2219
Just stop the data-loop before destroying the modules because they might
still try to access it.
Destroy the data-loop in the free phase instead.
Fixes a valgrind error where module-rt tries to clear the thread-utils,
which causes the context to try to clear the thread-utils on the already
freed data-loop.
We use the done event to send the object serial to the client. Use an
invalid object id for this and filter it out on the receiver or else
the client might get an unexpected done event.
Fixes#2253
The RTKit module is being replaced by the RT module. Currently, it is
always built if D-Bus is present. For packagers, it can be beneficial to
be able to disable the legacy module. Add a Meson option to allow for
exactly that. Make it enabled by default to not change default behavior.
Setting a global thread-utils is not a good idea, especially
when multiple contexts will register their own interface.
Instead, set the thread-utils as a context object and use this to
configure the data loop in the context.
In JACK we need a per context implementation of the interface so that
we can find the context specific thread-utils.
See #2252
Assign half the latency to the internal ringbuffer and half on the
network and remote end.
Use a dll to calculate the drift from our target ringbuffer fill
level and use the stream rate property to driver the resampler.
This should reduce uncontrolled latency over the tunnel.
PulseAudio wants us to be a driver will pull requests from the remote
side. We would need to provide a clock based on the remote end and
also try to follow it when we are not a driver. It would be slightly
better because in the normal playback case we would be able to
avoid resampling. We might do this eventually.
The PropInfo either has a registered id (and then also a name from the
type-info) or a custom name as a string.
In all cases, the description contains a free form text that clarifies
the property.
Use the description in the stream controls name.
For the modules that require a driver, don't add ourselves to
the pipewire.dummy group but instead just use the NODE_WANT_DRIVER
property to be assigned to a driver.
This makes it possible for the nodes to move to another driver than the
dummy driver (which has very high priority) and it avoids resampling in
cases where the nodes are linked to an audio source or sink.
Only make the driver node active when we assign it an always_process
node. Otherwise we can keep the driver passive until some other active
nodes are added.
Fixes a case where an need_driver node would automatically activate
the driver, even when nothing is to be scheduled.
Deprecate pw_stream_get_time() in favour of _get_time_n() that contains
the size of the pw_time structure. Make the old one fill in the fields
up to the buffered field. Make the new one use the size to decide how
much info to fill in.
Add a new buffered field in pw_time that contains the buffered data
inside the converter/resampler. This leaves the queued field with
purely the user provided size in the buffers.
Use get_time_n() in places.
Make a custom thread_utils that can use the configured global
thread creator and set this in the data-loop.
This ensure that the data loop uses the creator thread when activated.
See #1495
When we are not working RT, only request a buffer when we recycled one
or when we had no buffers in the queue.
The reason is that we only want to request a new buffer when the
converter recycled a buffer and thus when the resampler has a new
input size suggestion.
We also want to request a new buffer when there is no new buffer to
queue. This would be an underrun but we need to keep on requesting
buffers in this case or else we stall forever.
We are really interested in the error code of the statements we queued
before the sync so clear any previous error first. Otherwise we might
pick up a previous random error, which never gets cleared.
See #1714
Keep a counter for the amount of times pw_init() was called and
only clear everything when pw_deinit() was called an equal amount of
times.
Also ensure that pw_init() can be called again after pw_deinit().
Fixes#2238