SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
To set the io on the mixer ports, we need to use the same id that
was used to add the port, not the id we use to identify the mixer
structure.
Fixes#759
Only implement the null echo cancel implementation for now.
And skeleton webrtc echo cancel implementation
It uses 4 streams arranged as:
input ---+---> source
^
|
sink ---+---> output
The output of the source is the filtered input of the input stream
(linked a master source) based on the data going from sink to
the output (linked to a master sink).
All streams are arranged in the same group so that the echo canceler
does not have to deal with clock drift. For echo cancelers that can
handle clock drift we might want place the source and sink chains
in different groups.
Pass properties as global properties so that they are applied
to both streams. Make sure node.name is set on both streams so that
they look good in tools like carla.
Do not return an error immediately if connect() fails with EAGAIN. Check
if it completed successfully with getsockopt() when the socket becomes
writable instead.
This is the way to handle non-blocking connect() by the book but after
testing it seems that the case when connect() fails with EAGAIN is when
the listen backlog is full on the server side and in that case the
server socket is closed. So even though connect() completes successfully
according to getsockopt() the client socket is no longer usable
(on_remote_data() will get both SPA_IO_OUT and SPA_IO_HUP in mask on the
first call after connect() returned EAGAIN).
Make it possible to specify different channels and positions
per stream so that we can do remapping as well.
Make sure we only copy available input channels and set the remaining
channels empty.
Handle error when loading and fix leaks.
Mark streams as virtual if nothing else is specified.
Try to reuse an existing core connection if possible.
unload the module when the core is in error or when it is destroyed.
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
The simple protocol listens on a socket, creates a new pw_client for
each connected client and reads/writes raw audio bytes on the
socket. Incomming bytes are copied to a playback stream, outgoing
bytes are copied from a capture pw_stream.
Fixes#954
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