#!/bin/sh

# A simple script to facilitate the use of the OSS compatibility library.
# Usage:
#	aoss <command> <command options and arguments>

if [ -d /proc/asound ]; then
  prefix=/usr
  libdir=${prefix}/lib/aarch64-linux-gnu
  LD_PRELOAD=${libdir}/libaoss.so${LD_PRELOAD:+:$LD_PRELOAD} exec "$@"
else
  echo "Warning: /proc/asound not found. Running without ALSA wrapper."
  exec "$@"
fi
exit 1
