diff options
Diffstat (limited to 'core/modules/pulseaudio')
5 files changed, 56 insertions, 0 deletions
diff --git a/core/modules/pulseaudio/data/opt/openslx/pvs2/addons/50-pavucontrol b/core/modules/pulseaudio/data/opt/openslx/pvs2/addons/50-pavucontrol new file mode 100644 index 00000000..eb325ef6 --- /dev/null +++ b/core/modules/pulseaudio/data/opt/openslx/pvs2/addons/50-pavucontrol @@ -0,0 +1,5 @@ +[General] +exec=/usr/bin/pavucontrol +caption=Soundkonfiguration +tooltip=Startet pavucontrol +type=menu diff --git a/core/modules/pulseaudio/data/opt/openslx/vmchooser/sessionstart.d/default-sound-volume b/core/modules/pulseaudio/data/opt/openslx/vmchooser/sessionstart.d/default-sound-volume new file mode 100755 index 00000000..990e7af0 --- /dev/null +++ b/core/modules/pulseaudio/data/opt/openslx/vmchooser/sessionstart.d/default-sound-volume @@ -0,0 +1,15 @@ +#!/bin/ash +# +# This hook evaluates the SLX_VM_SOUND configuration option +# and mutes the sound via PulseAudio if appropriate. This will only +# take effect in non-virtual sessions (determined by the +# env variable SESSION_TYPE given by vmchooser). + +if [ "$SESSION_TYPE" = "XSESSION" ]; then + . /opt/openslx/config + + if [ "$SLX_VM_SOUND" = "DEFAULT_MUTED" ] || [ "$SLX_VM_SOUND" = "FORCE_MUTED" ]; then + pactl set-sink-mute @DEFAULT_SINK@ 1 + fi +fi +: # fake success to not trigger slxlog diff --git a/core/modules/pulseaudio/module.build b/core/modules/pulseaudio/module.build new file mode 100644 index 00000000..abb45cf4 --- /dev/null +++ b/core/modules/pulseaudio/module.build @@ -0,0 +1,17 @@ +#!/bin/bash + +fetch_source() { + : +} + +build() { + declare -a confs + local conf link base + readarray -d '' confs < <( find /usr/share/alsa/alsa.conf.d/ -type f -name "*pulse*.example" -print0 ) + mkdir -p "${MODULE_BUILD_DIR}/usr/share/alsa/alsa.conf.d" + for conf in "${confs[@]}"; do + base="${$conf##*/}" + link="${base%.example}" + ln -ns "$base" "${MODULE_BUILD_DIR}/usr/share/alsa/alsa.conf.d/${link}" + done +} diff --git a/core/modules/pulseaudio/module.conf b/core/modules/pulseaudio/module.conf new file mode 100644 index 00000000..67c6cc5e --- /dev/null +++ b/core/modules/pulseaudio/module.conf @@ -0,0 +1,12 @@ +#!/bin/bash + +REQUIRED_DIRECTORIES=" + /etc/dbus-1 + /etc/pulse + /etc/xdg/autostart + /lib/udev + /usr/bin + /usr/lib + /usr/share/alsa + /usr/share/pulseaudio +" diff --git a/core/modules/pulseaudio/module.conf.ubuntu b/core/modules/pulseaudio/module.conf.ubuntu new file mode 100644 index 00000000..f33d6b1d --- /dev/null +++ b/core/modules/pulseaudio/module.conf.ubuntu @@ -0,0 +1,7 @@ +#!/bin/bash + +REQUIRED_CONTENT_PACKAGES=" + libasound2-plugins + pavucontrol + pulseaudio +" |