distribution/packages/jelos/sources/autostart/common/005-alsa
fewtarius 22ffd7ed07
* Add support for including AppImages in JELOS builds.
* Update PCSX2 to use the upstream AppImage.
* Complete PCSX2 standalone integration.
* Update volume controls to use mapped volume mode.
* Update GTK3 to build additional required bits.
2022-09-22 19:50:28 -04:00

28 lines
824 B
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
# Copy in the configuration
if [ ! -e "/storage/.config/asound.conf" ]
then
cp /usr/config/asound.conf /storage/.config
fi
if [ ! -e "/storage/.config/asound.state" ] && [ -e /usr/config/asound.state ]
then
cp /usr/config/asound.state /storage/.config
fi
# Set the mixer in ES
sed -i 's#<string name="AudioDevice" value="'.*'" />#<string name="AudioDevice" value="'${DEVICE_AUDIO_MIXER}'" />#' /storage/.emulationstation/es_settings.cfg
# Initialize sound using the state if available.
if [ -e "/storage/.config/asound.state" ]
then
alsactl restore -f /storage/.config/asound.state
fi
VOL=$(get_setting "audio.volume" 2>/dev/null)
amixer -M set "${DEVICE_AUDIO_MIXER}" ${VOL}%