We should always advance the read pointer when we are underrun and
not corked. This will request more bytes from the client to make
things advance.
Fixes#2041
Use the lower 32 bits of the object serial as the index. When there is
an overflow, use an invalid index, which will probably result in a
protocol error.
Don't use max_quantum as the upper quantum limit, this is now scaled
with the rate. Use quantum_limit instead. We don't really care about the
max_quantum anymore so get rid of the field.
Firstly, separate the message dropping logic into
its own `drop_from_out_queue()` function.
Secondly, do not check earlier messages if the NEW
event for a particular object has been reached while
processing a REMOVE event for that object.
Thirdly, if - while processing a REMOVE event -
the corresponding NEW event is found and dropped,
drop the REMOVE event as well.
See #1840
Parse the quantum_limit parameters and use this to scale the buffers so
that they can contain the maximum allowed samples instead of the
hardcoded 8192 value.
See #1931
Also scale the max_quantum with the selected rate. Add a new
quantum_limit property that is the upper limit of the quantum regardless
of the sample rate, this is usually the allocated buffer size.
See #1931
Based on patch from Barnabás Pőcze <pobrn@protonmail.com>
Instead of trying to keep track of the missing bytes ourselves, use the
simple tlength - avail - requested formula to request more bytes from
the client.
Fixes#1981
Extend the server.address property so that you can also specify
an object per server. Add support for configuring some aspects of the
server such as max-clients and backlog.
Most importantly, the pipewire client.access can be configured per
server.
See #1960
Make the alignment parameter optional when negotiating buffers.
Default to a 16 bytes alignment and adjust for the max cpu
alignment.
Remove the useless align buffer parameter in plugins, we always
set it to 16 anyway.
For example, pulseaudio.js[1] immediately sends a
GET_SERVER_INFO request after AUTH, and only later
issues a SET_CLIENT_NAME.
See #1966.
[1]: https://github.com/janakj/pulseaudio.js
By default require that a client is authenticated and
has a manager to be allowed to run a command.
Specially:
* AUTH requires nothing
* SET_CLIENT_NAME and STAT only require authentication
Two `pw_properties` objects are not freed in the error path.
Resolves Coverity issues: 1468665, 1468666, 1468667, 1468668.
Furthermore, the module argument string is also not freed.