diff --git a/10-bitperfect.conf b/10-bitperfect.conf index 5cfb01b..652237d 100644 --- a/10-bitperfect.conf +++ b/10-bitperfect.conf @@ -1,4 +1,4 @@ context.properties = { #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 ] } \ No newline at end of file diff --git a/fedora_post_install.sh b/fedora_post_install.sh index f06efbb..7ff19f1 100644 --- a/fedora_post_install.sh +++ b/fedora_post_install.sh @@ -7,6 +7,20 @@ if [[ $EUID > 0 ]]; then sudo su - 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" # 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 @@ -136,10 +150,15 @@ systemctl daemon-reload &> /dev/null systemctl enable --now flatpak-update.timer &> /dev/null ###Bit-perfect audio support -sed -i 's+\#default\.clock\.rate+default.clock.rate+g' /usr/share/pipewire/pipewire.conf -sed -i 's+\#default\.clock\.allowed-rates.*+default.clock.allowed-rates = [ 44100, 48000, 88200, 96000, 192000 ]+g' /usr/share/pipewire/pipewire.conf -cp /etc/pipewire/pipewire.conf /etc/pipewire/pipewire.conf.bak &> /dev/null -cp /usr/share/pipewire/pipewire.conf /etc/pipewire/pipewire.conf -f &> /dev/null +function bitperfect_audio { + ###This will enable support for the following audio sample rates: + ###44100, 48000, 88200, 96000, 176400, 192000 + ###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 echo "Script completed, please reboot." \ No newline at end of file