When we are not working RT, only request a buffer when we recycled one
or when we had no buffers in the queue.
The reason is that we only want to request a new buffer when the
converter recycled a buffer and thus when the resampler has a new
input size suggestion.
We also want to request a new buffer when there is no new buffer to
queue. This would be an underrun but we need to keep on requesting
buffers in this case or else we stall forever.
We are really interested in the error code of the statements we queued
before the sync so clear any previous error first. Otherwise we might
pick up a previous random error, which never gets cleared.
See #1714
Keep a counter for the amount of times pw_init() was called and
only clear everything when pw_deinit() was called an equal amount of
times.
Also ensure that pw_init() can be called again after pw_deinit().
Fixes#2238
Library code generally shouldn't modify global state, so pw_init()
should not result to changing the C locale.
Instead, set the C locale in main() for tools and daemons.
We'll still setlocale for LC_MESSAGES, to get translated UI elements in
wireplumber. This workaround should be removed eventually...
This mode allows using a json file generated by pw-dump as input,
in order to visualize it.
Example usage:
pw-dump > dump.json
pw-dot -j dump.json -sL
This enables developers to easily visualize user dumps and at liberty switch
visualization modes (all, smart, detail, etc) without requiring the user
to do anything except for generating the initial dump.
And use this in spa_json_format_float() where we also avoid invalid
json floats.
Use json float format in some places where we serialize json floats.
Add a unit test.
See #2223
After dequeueing the buffer, the code immediately checks if it is NULL,
and never modifies the variable. Therefore there is no need to check
again when the buffer is enqueued.
Add a property to select the upmix method. PSD is enabled by default
but a new simple upmixing algorithm is available that duplicates
channels and avoids lowpass filter on the FC and disables widening.
Fixes#861
meson automatically generates a .gitignore file that ignores
everything in the build directory when it is configured.
There is no need to explicitly add build directories
to the top-level .gitignore.
Remove quantum limitation from a2dp-sink, and adjust how flushing is
done.
The "low-latency" A2DP codecs are not able to flush all data at once, so
for them flush based on a timeout, such that "excess samples" for each
quantum is bounded. We also limit excess samples for the other A2DP
codecs, based on some testing on flaky headset/adapter combinations (for
most cases, this does not appear to matter).
Leave decision of packet sizes to the codecs. Currently, we send packets
based on min_latency, but sendinf full packets might help with stutter
on some headset/adapter combinations. The slightly increased latency
hardly matters against the 100ms delays in BT headsets.
Bump codec API version.
If we get an EAGAIN, the device has started lagging in processing its
packets. We should not try to stuff the same packet in again, because
the device will just lag more. Instead, just drop current data, and hope
bitpool reduction takes care of it.
Also increase bitpool only if the socket buffer is empty.
Support setting extra properties on the sink and source with the
sink/source_properties.
Fix construction of the module arguments, the sink/source.props needs to
be inside the object..
Fixes #2201
When a particular AvahiWatch is being dispatched, it cannot
be freed because `watch_callback()` accesses it after
the callback.
Introduce a member (`dispatching`) to coordinate
the deferred freeing in that case.
The timeouts are not affected because the `AvahiTimeout`
object is not accessed after the callback is called.