From 53a6f526b9ad54cd0f35c5ec5ee3f217837baa5d Mon Sep 17 00:00:00 2001 From: neyuru <44687290+neyuru@users.noreply.github.com> Date: Tue, 24 Jan 2023 20:13:43 -0600 Subject: [PATCH] Update cadence-pulse2jack 1) For use with systemd, set target systemd log journal, 2) delete code that overrides user's edits in their .conf files and, 3) start pulseaudio without using play.pa or play+rec.pa and use instead user choices --- data/cadence-pulse2jack | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/data/cadence-pulse2jack b/data/cadence-pulse2jack index 5266cb9..9ebda06 100755 --- a/data/cadence-pulse2jack +++ b/data/cadence-pulse2jack @@ -9,39 +9,6 @@ if [ ! -d ~/.pulse ]; then mkdir -p ~/.pulse fi -if [ ! -f ~/.pulse/client.conf ]; then - echo "autospawn = no" > ~/.pulse/client.conf -else - if (! cat ~/.pulse/client.conf | grep "autospawn = no" > /dev/null); then - sed -i '/autospawn =/d' ~/.pulse/client.conf - echo "autospawn = no" >> ~/.pulse/client.conf - fi -fi - -if [ ! -f ~/.pulse/daemon.conf ]; then - echo "default-sample-format = float32le" > ~/.pulse/daemon.conf - echo "realtime-scheduling = yes" >> ~/.pulse/daemon.conf - echo "rlimit-rttime = -1" >> ~/.pulse/daemon.conf - echo "exit-idle-time = -1" >> ~/.pulse/daemon.conf -else - if (! cat ~/.pulse/daemon.conf | grep "default-sample-format = float32le" > /dev/null); then - sed -i '/default-sample-format = /d' ~/.pulse/daemon.conf - echo "default-sample-format = float32le" >> ~/.pulse/daemon.conf - fi - if (! cat ~/.pulse/daemon.conf | grep "realtime-scheduling = yes" > /dev/null); then - sed -i '/realtime-scheduling = /d' ~/.pulse/daemon.conf - echo "realtime-scheduling = yes" >> ~/.pulse/daemon.conf - fi - if (! cat ~/.pulse/daemon.conf | grep "rlimit-rttime = -1" > /dev/null); then - sed -i '/rlimit-rttime =/d' ~/.pulse/daemon.conf - echo "rlimit-rttime = -1" >> ~/.pulse/daemon.conf - fi - if (! cat ~/.pulse/daemon.conf | grep "exit-idle-time = -1" > /dev/null); then - sed -i '/exit-idle-time =/d' ~/.pulse/daemon.conf - echo "exit-idle-time = -1" >> ~/.pulse/daemon.conf - fi -fi - # ---------------------------------------------- PLAY_ONLY="no" @@ -118,7 +85,7 @@ if (IsPulseAudioRunning); then } else { - if (`pulseaudio --daemonize --high-priority --realtime --exit-idle-time=-1 --file=$FILE -n`); then + if (`pulseaudio --daemonize=no --log-target=journal`); then echo "Initiated PulseAudio successfully!" else echo "Failed to initialize PulseAudio!"