-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpkg/pulseaudio: improvements (#272)
- disabling daemon - adding a warning message - adding `pulseaudio-start` script to make it easier to start/configure pulseaudio Co-authored-by: Maxython <[email protected]>
- Loading branch information
Showing
2 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!@TERMUX_PREFIX@/bin/bash | ||
|
||
# A simple script that simplifies the configuration of pulseaudio-glibc | ||
|
||
unset LD_PRELOAD | ||
unset PULSE_SERVER | ||
|
||
PA_IP="127.0.0.1" | ||
|
||
pa_pid=$(pidof "@TERMUX_PREFIX_CLASSICAL@/bin/pulseaudio") | ||
if [ -n "${pa_pid}" ]; then | ||
kill ${pa_pid} | ||
fi | ||
|
||
if [ "${1}" = "-kill" ] || [ "${1}" = "-k" ]; then | ||
if [ -n "${pa_pid}" ]; then | ||
echo "pulseaudio was stopped successfully" | ||
fi | ||
exit 0 | ||
fi | ||
|
||
@TERMUX_PREFIX_CLASSICAL@/bin/pulseaudio --start --exit-idle-time=-1 || exit 1 | ||
@TERMUX_PREFIX_CLASSICAL@/bin/pacmd load-module module-native-protocol-tcp auth-ip-acl=${PA_IP} auth-anonymous=1 || exit 1 | ||
|
||
echo "To make pulseaudio-glibc work, copy and paste this command into your shell:" | ||
echo | ||
echo " export PULSE_SERVER=${PA_IP}" | ||
echo |