Add port.ignore-latency prop, which if true causes peer ports to ignore
the latency of the given port.
This is useful for ports that are not intended to affect latency
calculations of other ports, such as ports in monitor streams.
When we're using the peaks resampler, allow resampling, even when it is
disabled in the config.
The peaks resampler is just for GUI and would not really change the
signal, so we can allow this.
But instead ship config override files to enable it again.
The idea is that distros can make extra packages that can than be
installed to enable the upmixing.
Also ship a config file to enable more samplerates.
Fixes#3081
Add SPA_SCALE32_UP that scales a uint32 without overflow.
Use this for scaling the threshold in ALSA.
Fix the scaling in audioconvert of the buffer size, the scaling was
wrong and it was also causing an overflow resulting in choppy sound in
some cases.
See #2680
If there is no valid channel map, assume MONO channels. A valid channel
map should be assigned at the source of the data, not here.
The problem is that when a device uses AUX channels, this will be fixed
up here with a surround setup, which is not right.
Make a new variable to iterate the other ports so that we can use the
original port to emit notifications.
Fixes Latency and other params set on DSP ports.
When the follower updates EnumFormat, it probably wants to renegotiate
to a new format, so clear the current format so that we do that when
starting the next time.
EnumFormat should also not only return the current format in case we
are negotiated but it should return all possible formats.
See #2832
After the ports are reconfigured, we need to perform the setup again so
that buffers and processing can happen with the right settings.
This fixes an issue when autoswitching between A2DP and HFP with
bluetooth headsets when there is also a stereo capture device available.
The input stream of the browser is quickly reconfigured between stereo
and mono with only a Pause command in between, clearing the setup state
is enough to redo the setup when going back to Playing.
Fixes#2764
The parsing functions expect float values in the default locale so use
the spa_dtoa function to generate such a float.
Fixes setting params with floating point values when the locale is not
the default locale.
When we were using the resampler and then bypass it when the configured
rate == 1.0, we create a pop because we don't process the queued data in
the resampler anymore.
Avoid this by keeping the resampler active as soon as the rate property
is set on the audioconvert. The resampler itself will use a more
efficient copy method in that case anyway and it is expected that the
rate will change again later when we need to reactivate the resampler.
uint32_t i;
for (i = 0; i < SPA_N_ELEMENTS(some_array); i++)
.. stuff with some_array[i].foo ...
becomes:
SPA_FOR_EACH_ELEMENT_VAR(some_array, p)
.. stuff with p->foo ..
A flush command is not supposed to stop playback but just clear the
current state. Normally, to avoid complications, an application will
Pause, Flush and optionally Start to do things smoothly without
interfering with the process loop, but things should not crash if that's
not the case.
Fixes#2726
A Suspend should clear all the negotiated state and start a new
negotiation in Start. Use a flag to control this.
This avoids recalculation of state for each pause/play state change.
See #2701
Add a resampler option to prefill the resampler with 0. This then
results in the resampler always outputing and consuming the same
amount of data instead of a short buffer in the beginning.