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)
JACK can handle 2 buffers at most, make the default buffer allocator
allocate 2 buffers when no params are given.
Prefer 2 buffers, it allows some form of async fill/consume
When we finished processing the history it might be possible that we
need to skip some samples from the input. Implement this by adding
a start offset for the samples in the buffer.
We can produce data whenever the io area status != HAVE_DATA. We
don't need to look for NEED_DATA.
Also recycling buffer happens whenever the status != HAVE_DATA.
If the target node is set to 0, remove the autoconnect flag. This makes
the session manager disable stream autoconnect and some other program
needs to connect the stream to a sink or node.
Use the channelmap from the file, if available.
Add option to specify/override the channel map for playback.
The card name (id) can be configured with udev rules to remain
constant based on where the device is plugged in even when there
mulitple of the same devices.
Add a asprintf helper function that handles errors correctly.
Use this in places where we use asprintf to avoid warnings when we
don't check the return value.
This allows the upstream node to put buffers back to its pool in case
they were left around in the ready list locally when the alsa-pcm-sink
was last paused.
Fixes#203
Don't just remove the buffer from the queue when it was only
partially written. To do this, return the error code from add_buffer
and only remove the buffer when there is a real error.