aboutsummaryrefslogtreecommitdiffziptar.gz
path: root/scripts/alsoft_wave.sh
diff options
context:
space:
mode:
authorgodosa <godosa@godosa.eu>2026-10-06 23:39:36 +0200
committergodosa <godosa@godosa.eu>2026-10-06 23:39:36 +0200
commit39066900773e7857faf2d02e7ed51b71d219d97d (patch)
treeffab8e4ddd971626776c3b1f4ce1da2c186c2187 /scripts/alsoft_wave.sh
downloadgodosa-engine-39066900773e7857faf2d02e7ed51b71d219d97d.tar.gz
godosa-engine-39066900773e7857faf2d02e7ed51b71d219d97d.zip
godosa-engine: initial public history
Diffstat (limited to 'scripts/alsoft_wave.sh')
-rwxr-xr-xscripts/alsoft_wave.sh18
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