]> git.ipfire.org Git - thirdparty/qemu.git/commit
audio: add float sample endianness converters
authorVolker Rümelin <vr_qemu@t-online.de>
Thu, 15 May 2025 05:44:29 +0000 (07:44 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Sun, 25 May 2025 09:28:28 +0000 (11:28 +0200)
commit5d978c5da7f7d85d3a74b7d4dbe9ba5c5584d560
tree472e1b3621572c13e025084ea9344005887d64ce
parent9ddb7c85c965636f7abf91382dc40175ce121aa3
audio: add float sample endianness converters

Commit ed2a4a7941 ("audio: proper support for float samples in
mixeng") added support for float audio samples. As there were no
audio frontend devices with float support at that time, the code
was limited to native endian float samples.

When nobody was paying attention, an audio device that supports
floating point samples crept in with commit eb9ad377bb
("virtio-sound: handle control messages and streams").

Add code for the audio subsystem to convert float samples to the
correct endianness.

The type punning code was taken from the PipeWire project.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20250515054429.7385-7-vr_qemu@t-online.de>
audio/audio.c
audio/audio_template.h
audio/mixeng.c
audio/mixeng.h