COMMAND_UPDATE_PLAYBACK_STREAM_SAMPLE_RATE is ineffective
Version, Distribution, Desktop Environment:
pipewire-pulseaudio-0.3.27-1.fc34.x86_64
, Fedora 34, Gnome on X11.
Description of Problem:
I have some code that (in certain circumstances) starts a stream at 48 kHz and then later tries to adjust it to 44.1 kHz by calling pa_stream_update_sample_rate()
. I believe that this worked on Fedora 33 with PulseAudio, but it doesn’t work on Fedora 34 with PipeWire.
The following appears in journalctl --user
, suggesting that the message is getting through to the daemon:
pipewire-pulse[2808]: pulse-server 0x55a382d68d90: [SqueezeLite] UPDATE_PLAYBACK_STREAM_SAMPLE_RATE tag:35 channel:0 rate:44100
However, pw-top
shows that the sample rate remains at 48000:
S ID QUANT RATE WAIT BUSY W/Q B/Q ERR NAME
…
50 4096 48000 665.9µs 26.8µs 0.01 0.00 8 alsa_output.pci-0000_0b_02.0.analog-stereo-speaker
29 10080 48000 111.9µs 450.5µs 0.00 0.01 8 + SqueezeLite
How Reproducible: Always.
Actual Results: Audio plays too quickly. Singers sound like chipmunks.
Expected Results: Audio plays at the correct rate and sounds normal.