Better way to enable bit-perfect audio
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
context.properties = {
|
context.properties = {
|
||||||
#default.clock.rate = 48000
|
#default.clock.rate = 48000
|
||||||
default.clock.allowed-rates = [ 44100, 48000, 88200, 96000, 176400, 192000, 384000 ]
|
default.clock.allowed-rates = [ 44100, 48000, 88200, 96000, 176400, 192000 ]
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,20 @@ if [[ $EUID > 0 ]]; then
|
|||||||
sudo su -
|
sudo su -
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Source - https://stackoverflow.com/a/29436423
|
||||||
|
# Posted by Tiago Lopo, modified by community. See post 'Timeline' for change history
|
||||||
|
# Retrieved 2026-04-07, License - CC BY-SA 3.0
|
||||||
|
function yes_or_no {
|
||||||
|
while true; do
|
||||||
|
read -p "$* [y/n]: " yn
|
||||||
|
case $yn in
|
||||||
|
[Yy]*) return 0 ;;
|
||||||
|
[Nn]*) echo "Aborted" ; return 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "adding RPM fusion repos & updating DNF"
|
echo "adding RPM fusion repos & updating DNF"
|
||||||
# Get the free repository (most stuff you need)
|
# Get the free repository (most stuff you need)
|
||||||
dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm &> /dev/null
|
dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm &> /dev/null
|
||||||
@@ -136,10 +150,15 @@ systemctl daemon-reload &> /dev/null
|
|||||||
systemctl enable --now flatpak-update.timer &> /dev/null
|
systemctl enable --now flatpak-update.timer &> /dev/null
|
||||||
|
|
||||||
###Bit-perfect audio support
|
###Bit-perfect audio support
|
||||||
sed -i 's+\#default\.clock\.rate+default.clock.rate+g' /usr/share/pipewire/pipewire.conf
|
function bitperfect_audio {
|
||||||
sed -i 's+\#default\.clock\.allowed-rates.*+default.clock.allowed-rates = [ 44100, 48000, 88200, 96000, 192000 ]+g' /usr/share/pipewire/pipewire.conf
|
###This will enable support for the following audio sample rates:
|
||||||
cp /etc/pipewire/pipewire.conf /etc/pipewire/pipewire.conf.bak &> /dev/null
|
###44100, 48000, 88200, 96000, 176400, 192000
|
||||||
cp /usr/share/pipewire/pipewire.conf /etc/pipewire/pipewire.conf -f &> /dev/null
|
###Please adjust according to the capabilities of your hardware
|
||||||
|
###or simply delete the file created below if you don't care about resampling
|
||||||
|
mkdir -p ~/.config/pipewire/pipewire.conf.d
|
||||||
|
curl https://git.zfx.dk/Siim/Fedora-post-install-script/raw/branch/main/10-bitperfect.conf > ~/.config/pipewire/pipewire.conf.d/10-bitperfect.conf
|
||||||
|
}
|
||||||
|
yes_or_no "Would you like to add support for high-res audio?" && bitperfect_audio ||
|
||||||
|
|
||||||
###All done
|
###All done
|
||||||
echo "Script completed, please reboot."
|
echo "Script completed, please reboot."
|
||||||
Reference in New Issue
Block a user