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.
Use the DSP media subtype to describe DSP formats. DSP formats
don't include the rate, channels and channel position in the
format and must use the rate and duration from the position io. This
makes it possible to later change the samplerate dynamically without
having to renegotiate the graph.
The same goes for the video DSP format, which uses the io_video_size
from the io_position to get the size/stride. Set this up in the node
based on the defaults from the context.
Make it possible to define defaults in the daemon config file, such
as samplerate, quantum, video size and framerate. This is stored in
the context and used for the DSP formats.
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.