Reducing latency of newly built in Spice audio under Pipewire

,

My goal is to get low latency audio working without passing through my audio interface.

Current Hardware:

  • Ryzen 7600x
  • RX-6700xt
  • Scarlett 2i2
  • Pipewire 0.3.65
  • Qemu 7.2.0
  • LibVirtD 8.9.0

I have tried to use the built in spice audio in the B6 version with the PIPEWIRE_LATENCY=512/192000 variable, resulting in the warning PIPEWIRE_LATENCY value '512/192000' is invalid or does not match stream sample rate; using 2048/48000. I’ve set both in the commandline before looking-glass-client and inside of my xml file with:

<qemu:commandline>
    <qemu:env name='PIPEWIRE_RUNTIME_DIR' value='/run/user/1000'/>
    <qemu:env name='PIPEWIRE_LATENCY' value='512/192000'/>
</qemu:commandline>

I then would manually set my pipewire latency with pw-metadata -n settings 0 clock.force-rate 192000 resulting in it being pitched down, even if I restart the VM.

I have also tried to just use the raw jack audio and it’s not any better, leading me to believe it’s a failure on my part, but I am kinda out of ideas.

Is there anything else I’m missing I could try? I feel like the windows default audio driver might be stuck at 48k, but if I run reaper with asio it shows it’s using 192khz with 512 samples. Maybe even my interface isn’t playing at 192khz because it’s in a VM?

1 Like

See the audio section in the looking-glass-client --help output.

As the LG client itself is outputting the audio, qemu env vars make no sense.

The virtual sound device is incapable of anything > 65KHz due the design of QEMUs audio layer. The only sample rate that makes sense is 48KHz because QEMU will resample anything else to that.

1 Like