Audio? I believe X has nothing to do with audio. This is a job for ALSA, pulseaudio and most recently pipewire.
---
Here - to quote the debian wiki (https://wiki.debian.org/PipeWire):
"PipeWire is a server and API for handling multimedia on Linux. Its most common use is for Wayland and Flatpak applications to implement screensharing, remote desktop, and other forms of audio and video routing between different pieces of software. Per the official FAQ, "you can think of it as a multimedia routing layer on top of the drivers that applications and libraries can use."