- Jun 30, 2022
-
-
Wim Taymans authored
-
-
Wim Taymans authored
There is no reason to store this as anything other than the original hex string. Especially for compatibility with pulseaudio. See !1298
-
- Jun 29, 2022
-
-
Wim Taymans authored
Seem to produce a little sharper cutoff. Fixes #2483
-
Wim Taymans authored
To compare the results: pw-cat -r test.wav --format=u8 -P '{ dither.method=none }' vs: pw-cat -r test.wav --format=u8 -P '{ dither.method=shaped5 }'
-
Wim Taymans authored
-
Wim Taymans authored
We need to transform the number of bytes into frames.
-
Wim Taymans authored
-
Wim Taymans authored
Make dither noise as a value between -0.5 and 0.5 and add this to the scaled samples. For this, we first need to do the scaling and then the CLAMP to the target depth. This optimizes to the same code but allows us to avoid under and overflows when we add the dither noise. Add more dithering methods. Expose a dither.method property on audioconvert. Disable dither when the target depth > 16.
-
Wim Taymans authored
-
Wim Taymans authored
-
- Jun 28, 2022
-
-
Wim Taymans authored
This saves some shifts.
-
Wim Taymans authored
-
Wim Taymans authored
We need to do dithering and noise when converting f32 to the target format. This is more natural because we can work in 32 bits integers instead of floats. This will also make it possible to actually calculate the error between source and target values and implement some sort of feedback and noise shaping later.
-
Wim Taymans authored
And debug them.
-
Wim Taymans authored
-
Wim Taymans authored
-
Wim Taymans authored
Move the noise setting in the dither struct so that it can be handled separately. Setup dither separately. Set used cpu_flags in structures after setup.
-
Wim Taymans authored
The quantize is the amount of bits we want to keep from the original signal, subtract the amount of bits for noise. Clamp this to 0 (all noise). Calculate the scale factor better with powf() and avoid overflows. Fixes #2479
-
- Jun 27, 2022
-
-
Wim Taymans authored
Use the quantize value to specify how many bits to quantize to.
-
Wim Taymans authored
-
Wim Taymans authored
-
Wim Taymans authored
Allocate a little bit more data to ensure alignment and overread of the dither data. Ensure sse2 can load aligned data in all cases.
-
Wim Taymans authored
Add sse2 dither optimization
-
Wim Taymans authored
Rename empty.noise -> dither.noise and always add this amount of noise when > 0. This also adds the noise to silent sounds, not only when nothing is connected because that would also be a problem when an amp needs to be kept alive with an non-0 signal. Rename noise -> dither because we can use this also for dithering later. See #705
-
Wim Taymans authored
-
Takashi Sakamoto authored
PipeWire v0.3.7 or later hits assertion at alsa-lib mixer API due to wrong handling of removal event for mixer element. wireplumber: mixer.c:149: hctl_elem_event_handler: Assertion `bag_empty(bag)' failed. The removal event is defined as '~0U', thus it's not distinguished from the other type of event just by bitwise operator. At the removal event, class implementator for mixer API should detach mixer element from hcontrol element in callback handler since alsa-lib has assertion to check the list of mixer elements for a hcontrol element is empty or not after calling all of handlers. In detail, please refer to MR to alsa-lib: * https://github.com/alsa-project/alsa-lib/pull/244 This commit fixes the above two issues. The issue can be regenerated by `samples/ctl` Python 3 script of alsa-gobject. * https://github.com/alsa-project/alsa-gobject/ It adds some user-defined elements into sound card 0. When terminated by SIGINT signal, it removes the elements. Then PulseAudio dies due to the assertion. Fixes: 1612f5e4 ("alsa-acp: Add libacp based card device")
-
- Jun 24, 2022
-
-
Barnabás Pőcze authored
Shifting by 64 or more would not fit into `uint64_t`.
-
Barnabás Pőcze authored
Using `int` results in UndefinedBehaviorSanitizer errors when `noise::intensity` is 31 as that would shift the 1 into the sign bit of a signed integer type.
-
Barnabás Pőcze authored
-
It is valid for V4L2 devices to not implement any controls. QUERYCTRL returns ENOTTY in these cases. Enumerating the controls must not fail in these cases but return no controls.
-
The device needs to be closed when the enum_controls function is exited, but is not closed if the VIDIOC_QUERYCTRL fails. Fix it.
-
Wim Taymans authored
-
Wim Taymans authored
-
Wim Taymans authored
Add an empty.noise option that specifies the number of bits to use for noise when the input signal is pure silence. Some amplifiers can go into suspend mode pretty easily when they get pure silence. With empty.noise = 1, audioconvert will now generate a bitpattern that can keep those amplifiers alive, together with disabling suspend in the session manager. Fixes #705
-
Wim Taymans authored
-
Wim Taymans authored
Or else we undo all settings from the config params.
-
There seem to be some latent issues with buffer recycling, add some additional logging to simplify tracing buffer recycling issues.
-
Wim Taymans authored
Add an EMPTY chunk flag to mark a piece of memory as 'empty'. For audio this means silence. Use the empty flag to avoid mixing 0 samples. Set the empty flag in output buffers on audioconvert.
-
Wim Taymans authored
-