pipewire/src/modules/module-protocol-pulse
Volker Rümelin 92a41ba21f pipewire-pulse: generate silence on underflow correctly
Filling a buffer with zeros to produce silence is wrong for
unsigned sample formats and compressed sample formats. This is
silence with an offset. A silent stream with unsigned or
compressed samples mixed with another stream produces a clipped
stream. To hear the problem start QEMU with

qemu-system-x86_64 -accel kvm -smp 4 -m 4096 \
 -audiodev pa,id=audio0,out.mixing-engine=off \
 -machine pc,pcspk-audiodev=audio0 \
 -device ich9-intel-hda -device hda-duplex,audiodev=audio0 \
 -boot d -cdrom Fedora-Workstation-Live-x86_64-37-1.7.iso

on a host configured to use PipeWire and start audio playback on
the guest HDA device.

PA_SAMPLE_U8 is the only unsigned PulseAudio sample format.
There is no need to care about unsigned multi-byte formats.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
2023-03-24 19:53:26 +01:00
..
extensions treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
modules core: add bound_props event 2023-03-21 17:22:27 +01:00
client.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
client.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
cmd.c pulse-server: handle NULL args in load-module 2023-03-16 11:53:59 +01:00
cmd.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
collect.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
collect.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
commands.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
dbus-name.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
dbus-name.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
defs.h pulse-tunnel: translate pulse error to spa error 2023-03-13 12:26:20 +01:00
extension.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
extension.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
format.c pulse-server: improve channel_map parsing 2023-03-01 13:44:24 +01:00
format.h pulse-server: improve format parsing 2023-03-01 13:44:24 +01:00
internal.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
log.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
manager.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
manager.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
message-handler.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
message-handler.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
message.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
message.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
module.c pulse-server: escape module values 2023-03-07 13:15:49 +01:00
module.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
operation.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
operation.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
pending-sample.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
pending-sample.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
pulse-server.c pipewire-pulse: generate silence on underflow correctly 2023-03-24 19:53:26 +01:00
pulse-server.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
quirks.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
quirks.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
remap.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
remap.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
reply.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
reply.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
sample-play.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
sample-play.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
sample.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
sample.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
server.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
server.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
stream.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
stream.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
utils.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
utils.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
volume.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
volume.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00