home *** CD-ROM | disk | FTP | other *** search
/ tusportal.tus.k12.pa.us / tusportal.tus.k12.pa.us.tar / tusportal.tus.k12.pa.us / Wyse / latest-image.raw / 0.img / usr / bin / padsp < prev    next >
Text File  |  2011-09-14  |  2KB  |  87 lines

  1. #!/bin/sh
  2.  
  3. # This file is part of PulseAudio.
  4. #
  5. # Copyright 2006 Lennart Poettering
  6. # Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
  7. #
  8. # PulseAudio is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU Lesser General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # PulseAudio is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. # General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU Lesser General Public License
  19. # along with PulseAudio; if not, write to the Free Software
  20. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  21. # USA.
  22.  
  23. while getopts 'hs:n:m:MSDd' param ; do
  24.     case $param in
  25.         s)
  26.             PULSE_SERVER="$OPTARG"
  27.             export PULSE_SERVER
  28.             ;;
  29.         n)
  30.             PADSP_CLIENT_NAME="$OPTARG"
  31.             export PADSP_CLIENT_NAME
  32.             ;;
  33.         m)
  34.             PADSP_STREAM_NAME="$OPTARG"
  35.             export PADSP_STREAM_NAME
  36.             ;;
  37.         M)
  38.             PADSP_NO_MIXER=1
  39.             export PADSP_NO_MIXER
  40.             ;;
  41.         S)
  42.             PADSP_NO_SNDSTAT=1
  43.             export PADSP_NO_SNDSTAT
  44.             ;;
  45.         D)
  46.             PADSP_NO_DSP=1
  47.             export PADSP_NO_DSP
  48.             ;;
  49.         d)
  50.             if [ x"$PADSP_DEBUG" = x ]; then
  51.                 PADSP_DEBUG=1
  52.             else
  53.                 PADSP_DEBUG=$(( $PADSP_DEBUG + 1 ))
  54.             fi
  55.             export PADSP_DEBUG
  56.             ;;
  57.         *)
  58.             echo "$0 - redirect OSS audio devices to PulseAudio"
  59.             echo " "
  60.             echo "$0 [options] application [arguments]"
  61.             echo " "
  62.             echo "options:"
  63.             echo "    -h                  show brief help"
  64.             echo "    -s <host>[:<port>]  contact a specific PulseAudio server"
  65.             echo "    -n <name>           client name to report to the server"
  66.             echo "    -m <name>           stream name to report to the server"
  67.             echo "    -M                  disable /dev/mixer emulation"
  68.             echo "    -S                  disable /dev/sndstat emulation"
  69.             echo "    -D                  disable /dev/dsp emulation"
  70.             echo "    -d                  enable debug output"
  71.             exit 0
  72.             ;;
  73.     esac
  74. done
  75.  
  76. shift $(( $OPTIND - 1 ))
  77.  
  78. if [ x"$LD_PRELOAD" = x ] ; then
  79.    LD_PRELOAD="libpulsedsp.so"
  80. else
  81.    LD_PRELOAD="$LD_PRELOAD libpulsedsp.so"
  82. fi
  83.  
  84. export LD_PRELOAD
  85.  
  86. exec "$@"
  87.