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.
The dataType parameter is a bitmask of allowed data types for the
buffer memory. Make the mask by or-ing all (1 << enum spa_data_type)
you accept/produce.
The this field can be used by apps who keep a copy of the
spa_param_info. They can use it, for example, to keep a counter
with the amount of changes since last processed.
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>
The choice array might have excess elements when the type has been
changed, for example by fixation. This is not a problem and the
excess elements should simply be ignored.
Using the short name of a type without the base part is common enough
that a common utility method is warranted.
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)