diff options
Diffstat (limited to 'scripts/alsoft_wave.sh')
| -rwxr-xr-x | scripts/alsoft_wave.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/alsoft_wave.sh b/scripts/alsoft_wave.sh new file mode 100755 index 0000000..31644ec --- /dev/null +++ b/scripts/alsoft_wave.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Writes DIR/alsoft.conf so OpenAL Soft renders to DIR/audio.wav (wave backend, stereo +# int16) instead of the speakers, and removes an old DIR/audio.wav. Run the game with +# ALSOFT_CONF=DIR/alsoft.conf. Env: ALSOFT_EXTRA="key = value" lines added to [general]. +# Usage: alsoft_wave.sh DIR +set -euo pipefail +out=${1:?usage: alsoft_wave.sh DIR} +mkdir -p "$out" +rm -f "$out/audio.wav" +cat >"$out/alsoft.conf" <<CONF +[general] +drivers = wave +channels = stereo +sample-type = int16 +${ALSOFT_EXTRA:-} +[wave] +file = $out/audio.wav +CONF |
