Pipewire is designed for applications to state the quantum(buffer) they wish to use. This is confusing for users used to JACK which specifies a buffer value that applications follow. As a result, if the application doesn't state quantum then the applications used the default set in the config file. There are applications which change a setting that can force all applications to use the same buffer but this is unnecessary and misses the point of having a dynamic quantum and also these applications are changing the command temporarily until the next boot or pipewire restart.
For that purpose, I made a script that creates/modifies a user level config file and restarts the pipewire server using a syscontrol command. So people can change their default quantum, the change be persistent and it not need any knowledge of editing a config file to do so.
Code: Select all
#!/bin/bash
directory=~/.config/pipewire/pipewire.conf.d/
file=~/.config/pipewire/pipewire.conf.d/quantumsetting.conf
if ! [ -e "$directory" ] ; then
mkdir - p "$directory"
fi
PS3='Select the default quantum: '
options=("16" "32" "64" "128" "256" "512" "1024" "2048" "4096" "8192")
select opt in "${options[@]}"
do
case $opt in
"16")
echo "The default quantum is now $opt"
break
;;
"32")
echo "The default quantum is now $opt"
break
;;
"64")
echo "The default quantum is now $opt"
break
;;
"128")
echo "The default quantum is now $opt"
break
;;
"256")
echo "The default quantum is now $opt"
break
;;
"512")
echo "The default quantum is now $opt"
break
;;
"1024")
echo "The default quantum is now $opt"
break
;;
"2048")
echo "The default quantum is now $opt"
break
;;
"4096")
echo "The default quantum is now $opt"
break
;;
"8192")
echo "The default quantum is now $opt"
break
;;
*) echo "invalid option $REPLY";;
esac
done
echo "context.properties = {" > "$file"
echo " default.clock.quantum = $opt" >> "$file"
echo "}" >> "$file"
# Delete or comment out following line if you are using a non systemd distro like Devuan or Artix.
systemctl --user restart pipewire.service