Abuse the xrun callback in the adapter to emit the drained signal until
almost all data left the resampler. This needs more work with a proper
signal and a buffer flag to signal the drain.
Only set the OUTSTANDING flag when we placed the buffer in an
io area and need to recycle it later.
When we captured a frame, put it in the queue. Then dequeue it
into the io area after recycling buffers.
Fixes#217
We only set the OUT flag when we put the buffer on an io area and
might need to recycle later.
Before placing the output buffer into the io area, recycle any
buffer that might be left in there.
Only emit the ready callback when we have some data queued.
We should not have to initialize the state to NEED_DATA, anything
that is not HAVE_DATA is good. Also we need to set the buffer to
INVALID because else it might be recycled.
If we get an error after receovering, ignore it and assume we filled
the buffer completely. We need to do this or otherwise we stop the
timer and audio stops.
This small patch makes audiotestsrc work.
You will need to uncomment the following lines in pipewire.conf
add-spa-lib audiotestsrc audiotestsrc/libspa-audiotestsrc
create-object adapter node.name=my-test factory.name=audiotestsrc
If you use pw-record, use --list-targets to find the target id and
record using --target=<n>
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
There is a use case where you may want to use audioconvert with
both input & output sides configured in dsp mode, for altering
the stream volume. When it is configured like that, the
IS_MONITOR_PORT macro wrongly thinks that all output ports except
the first one are monitor ports, originating in the merger instead
of the splitter.
This change fixes that and it also completely disables exposing
monitor ports, even if they are enabled, when both sides are in
dsp mode (fmt_input_port_info() also uses the same macro to check
if the monitor ports are to be exposed)