サウンドの設定 kona5

サウンドの設定

/etc/kona/soundset.sh

/usr/share/applications/soundset.desktop

/usr/share/icons/gnome/scalable/emblems/emblem-music-symbolic.svg

******************************

#!/bin/bash
sdsystem="pulse!alsa"
accelators="normal!wide!deep"
resolves="10!20!25!50!100"
#
system0="$(cat /etc/kona/soundsystem)"
accel="$(cat /etc/kona/accelator)"
resolve="$(cat /etc/kona/timeslice)"
if [ -f /etc/kona/mpdstart ]; then
mpdstart="TRUE"
else
mpdstart="FALSE"
fi
listunits=$(systemctl list-unit-files|grep -e upmpdcli.service -e ssh.service)
if [ ! -z "$(echo $listunits|grep upmpdcli.service|grep enable)" ]; then
upmpdcli0="TRUE"
else
upmpdcli0="FALSE"
fi
if [ -f /lib/systemd/system/bubbleupnpserver.service ]; then
bubbleupnp0="TRUE"
else
bubbleupnp0="FALSE"
fi
if [ ! -z "$(echo $listunits|grep ssh.service|grep enable)" ]; then
ssh0="TRUE"
else
ssh0="FALSE"
fi
if [ -f /etc/kona/autoinitmem ]; then
autoim="TRUE"
else
autoim="FALSE"
fi
if [ -f /etc/kona/noipv6 ]; then
noipv6="TRUE"
else
noipv6="FALSE"
fi
if [ -f /etc/kona/stopcups ]; then
cupsstop="TRUE"
else
cupsstop="FALSE"
fi
ret=$(yad --form --center --no-wrap --title="サウンドの設定" --image="/usr/share/icons/Adwaita/32x32/emblems/emblem-music-symbolic.symbolic.png" --text="サウンドを設定します\n\n音響特性:システムや音源に最適なものを選択します\n normal ... 奥行きがあり響きが良い音(推奨)\n wide ... 広がりのある音\n deep ... 奥行きのある音\n" --field="サウンド・システム:CB" --field="音響特性:CB" --field="音の解像度:CB" --field="mpdを起動する:CHK" --field="upmpdcliを起動する:CHK" --field="bubbleupnpserverを起動する:CHK" --field="sshサーバーを起動する:CHK" --field="メモリーリフレッシュを定期的に行う(推奨):CHK" --field="ipv6は使用しない(推奨:音質が向上):CHK" --field="cups(印刷)を停止する(推奨:音質が向上):CHK" --button="キャンセル(_C):1" --button="OK(_O):0" "$system0!$sdsystem" "$accel!$accelators" "$resolve!$resolves" "$mpdstart" "$upmpdcli0" "$bubbleupnp0" "$ssh0" "$autoim" "$noipv6" "$cupsstop")
rcd="$?"
if [ "$rcd" = "0" ]; then
soundsystem=$(echo $ret|cut -d'|' -f1)
if [ "$soundsystem" != "$system0" ] && [ "$soundsystem" = "alsa" ]; then
zenity --warning --text="$soundsystemはDSDを再生するとき以外は使用しないでください" --no-wrap
fi
accelator=$(echo $ret|cut -d'|' -f2)
resolve=$(echo $ret|cut -d'|' -f3)
mpd=$(echo $ret|cut -d'|' -f4)
upmpdcli=$(echo $ret|cut -d'|' -f5)
bubbleupnp=$(echo $ret|cut -d'|' -f6)
ssh=$(echo $ret|cut -d'|' -f7)
autoim=$(echo $ret|cut -d'|' -f8)
noipv6=$(echo $ret|cut -d'|' -f9)
cupsstop=$(echo $ret|cut -d'|' -f10)
echo "$soundsystem" > /etc/kona/soundsystem
echo "$accelator" > /etc/kona/accelator
echo "$resolve" > /etc/kona/timeslice
if [ "$mpd" = "TRUE" ]; then
touch /etc/kona/mpdstart
else
rm -f /etc/kona/mpdstart
fi
if [ "$upmpdcli" != "$upmpdcli0" ]; then
if [ "$upmpdcli" = "TRUE" ]; then
gksudo systemctl enable upmpdcli.service
else
gksudo systemctl disable upmpdcli.service
fi
fi
if [ "$bubbleupnp" != "$bubbleupnp0" ]; then
if [ "$bubbleupnp" = "TRUE" ]; then
gksudo mv /usr/local/etc/kona/bubbleupnpserver.service /lib/systemd/system
else
gksudo mv /lib/systemd/system/bubbleupnpserver.service /usr/local/etc/kona
fi
fi
if [ "$ssh" != "$ssh0" ]; then
if [ "$ssh" = "TRUE" ]; then
gksudo systemctl enable ssh.service
else
gksudo systemctl disable ssh.service
fi
fi
if [ "$autoim" = "TRUE" ]; then
touch /etc/kona/autoinitmem
else
rm -f /etc/kona/autoinitmem
fi
if [ "$noipv6" = "TRUE" ]; then
touch /etc/kona/noipv6
echo 768 > /etc/kona/mtu
else
rm -f /etc/kona/noipv6
echo 1280 > /etc/kona/mtu
fi
if [ "$cupsstop" = "TRUE" ]; then
touch /etc/kona/stopcups
else
rm -f /etc/kona/stopcups
fi
zenity --info --title="サウンドの設定" --text="サウンドを設定しました\nシステムを再起動すると有効になります。" --no-wrap
elif [ "$rcd" = "2" ]; then
zenity --info --title="サウンドの設定" --text="メモリーをリフレッシュする前にプレイヤーを終了し\nリフレッシュ後に再起動すると効果的です。" --no-wrap
/etc/kona/initmem.sh
zenity --info --title="サウンドの設定" --text="メモリーをリフレッシュしました(ただちに反映)" --no-wrap
fi

****************

yad はDebian10の時にはsynapticで追加したような気がする