The message structures returned by pw_protocol_native_connection_get_next
point to data that is contained in the buffer of the connection.
The data was invalidated when pw_protocol_native_connection_get_next was
called the next time, which made the connection loop non-reentrant, in
cases where it was re-entered from demarshal callbacks.
Fix this by allocating new buffers when reentering and stashing the old
buffers onto a stack. The returned message structure is also stored on
the stack to make lifetimes to match.
Use the rate match io are to read the exact amount of samples we
need for this cycle from the ringbuffer. We can then request lower
latency.
There will also be less buffering in the audioconverter, which makes
our timestamps more accurate.
Parse the module arguments according to the pulseaudio syntax,
not our own syntax (which requires "" around a , delimter). Fixes
audio.position=FL,FR argument.
See #527
Make a new complete event and use it instead of the start event
Use the start event at the start of the cycle
Make the profiler also log incomplete graph cycles
Remove the separate error event and merge with the done event with
error code. This then also marks the sample as done when in error
so that it gets cleaned up properly.
Fixes#486
We can't write more to the ringbuffer than its maxsize. Some clients
send more than the negotiated maxsize and cause a crash if we don't
clamp.
See #440
Make a copy of the factory_name, the properties it is inside are
destroyed when the device can't be created and we still need the
name for the debug message.
A virtual source is usually implemented with a null-sink, it looks
like a source to pulseaudio clients but just forwards what it gets
as input.
Make sure the port names make sense.
You can use the null sink now as:
pactl load-module module-null-sink sink_name=source object.linger=1
media.class=Audio/Source/Virtual channel_map=FL,FR,RL,RR
This creates a node with "input" and "capture" ports and looks
like a virtual source for pulseaudio clients.
pactl load-module module-null-sink sink_name=source object.linger=1
media.class=Audio/Sink channel_map=FL,FR,RL,RR
This creates a node with "playback" and "monitor" ports and looks
like a virtual sink for pulseaudio clients.
pactl load-module module-null-sink sink_name=source object.linger=1
media.class=Audio/Duplex channel_map=FL,FR,RL,RR
This creates a node with "playback" and "capture" ports and looks
like a virtual source and sink for pulseaudio clients.