aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorfuzzard <fuzzard@users.noreply.github.com>2023-06-05 09:08:40 +1000
committerGitHub <noreply@github.com>2023-06-05 09:08:40 +1000
commitd3adb9fedf85332a9a67a5bc4241c9907b7a8afb (patch)
tree846a1a642f20b77a4b906eb7ecb2c47973058090 /tools
parent7fc9527c6aa94e3a6f7db7a89eef5825e3631e80 (diff)
parent3fb93608deea1dd5b87e0ae9e1d121f951d896e7 (diff)
Merge pull request #23148 from lrusak/linux-audio-params
CAppParamParserLinux: add --audio-backend=<backend> switch
Diffstat (limited to 'tools')
-rw-r--r--tools/Linux/kodi.sh.in20
1 files changed, 19 insertions, 1 deletions
diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in
index 11cace29a5..5dc1dd5260 100644
--- a/tools/Linux/kodi.sh.in
+++ b/tools/Linux/kodi.sh.in
@@ -171,12 +171,30 @@ if command_exists gdb; then
fi
fi
+if [ -n "${KODI_AE_SINK}" ]; then
+
+ echo "KODI_AE_SINK env variable is deprecated and will be removed in the future."
+ echo "Use the --audio-backend command line switch instead."
+
+ if [ "${KODI_AE_SINK}" = "PIPEWIRE" ]; then
+ ENV_ARGS="--audio-backend=pipewire"
+ elif [ "${KODI_AE_SINK}" = "PULSE" ]; then
+ ENV_ARGS="--audio-backend=pulseaudio"
+ elif [ "${KODI_AE_SINK}" = "ALSA" ]; then
+ ENV_ARGS="--audio-backend=alsa"
+ elif [ "${KODI_AE_SINK}" = "SNDIO" ]; then
+ ENV_ARGS="--audio-backend=sndio"
+ elif [ "${KODI_AE_SINK}" = "ALSA+PULSE" ]; then
+ ENV_ARGS="--audio-backend=alsa+pulseaudio"
+ fi
+fi
+
LOOP=1
while [ $(( $LOOP )) = "1" ]
do
[ -f "${APPORT_CORE}" ] && rm -f "${APPORT_CORE}"
LOOP=0
- ${KODI_BINARY} $SAVED_ARGS &
+ ${KODI_BINARY} ${ENV_ARGS} $SAVED_ARGS &
CHILD=$!
wait "${CHILD}"
RET=$?