Use the context work queue to schedule destroys from callbacks.
This is better because we can pass the destroyed object around and
implement just the action we need to do on it.
Make a null-sink with monitor.channel-volumes=true by default if not
defined otherwise. This ensures the volume of the null-sink is
always transfered to the monitor ports.
Also only set the object.linger flag when undefined.
If we have channels and channelmap, make sure they match.
If we have only channel_map, use this to derive channels instead of
taking the default number of channels and then ending up with a
mismatch.
If we have only channels, use this to generate a channelmap from
predefined maps or just unknown channels instead of taking the default
channel map.
If neither channels or channelmap is defined, use the defaults.
This starts breaking up the giant monolith that is the pulse-server.c
code into more manageable chunks by trying to split the module code into
individual compilation units.
Limit the amount of channels we send to a client to 32 because this
is the pulseaudio limit.
This means that only the first 32 channels are accessible from the
pulseaudio API.
Fixes#1033
Setting the channel property should create as many channels as
requested, not just the number from the default channel map.
If no channel_map is set, use the default one if the channels match
or use one with unknown channel layout otherwise.
Check the configured channels against the channel map and error
if there is a mismatch.
Do the check for the client event mask in only one place where we
are actually going to send the event. This avoids sending events to
clients that did not register them.
Rework some of the event handling when the manager emit an
add/remove/change event. Make it possible to send multiple events, like
when a sink changes, also emit a change for the monitor.
See #1042
Add an entry in the config file for default format and channel map.
Use the defaults in the server_info request
Use the defaults for the default channels and map in the modules.
priority.session is meant to be used to set routing priorities.
priority.driver is meant to be used by the scheduler to select what
nodes is best for driving the graph. This usually depends on the
hardware quality and the use case (Pro Audio devices are likely
to be used as driving the graph).
See #1028
When setting a new default sink/source, use the name of the object
instead of the name used for selecting the sink/source. This makes
it possible to use the id to search for the device but still have
the device name in the metadata as is expected.
Fixes#1004
source and sink need not be set and need to be mapped to the target
source/sink to connect to.
node.group needs to be a unique id shared by source/sink to make them
part of the same scheduling group and do clock sync.
Remove some unused properties
Some apps use 0 to get some sort of sink/source info. PulseAudio
likely has a source/sink at index 0 but PipeWire certainly does not.
Asking for 0 source/sink is always because of some hardcoded values
in the app and we can return the default source/sink without causing
any problems for other apps.
See #756
When we start draining, set ourselves active so that the process
function is called where the draining is completed.
This avoids a corked stream from waiting forever to drain the stream.
Fixes#946