Skip to content

Commit

Permalink
kodi.sh.in: Disable pulse when launching
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Dec 16, 2021
1 parent f700659 commit 50bdc3f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/Linux/kodi.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ do
LIBDIR="$2"
shift; shift
;;
--pulse)
WANT_PULSE=1
shift
;;
--windowing)
WINDOWING="$2"
echo "$SAVED_ARGS" | sed "s/--windowing[ ]*$2//g"
Expand Down Expand Up @@ -203,6 +207,12 @@ if command_exists gdb; then
fi
fi

if [ "$WANT_PULSE" != "1" ] && pactl list > /dev/null 2>&1 ; then
systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
PULSE_STOPPED=1
fi

LOOP=1
while [ $(( $LOOP )) = "1" ]
do
Expand All @@ -225,5 +235,9 @@ done
if [ -f "/usr/bin/cec-daemon" ]; then
sudo service cec start >/dev/null 2>&1
fi
if [ "$PULSE_STOPPED" = "1" ]; then
systemctl --user start pulseaudio.service
systemctl --user start pulseaudio.socket
fi

exit $RET

0 comments on commit 50bdc3f

Please sign in to comment.