Modify soundtest to use ALSA's speaker-test
authorChristian Hofstaedtler <ch@grml.org>
Wed, 12 Oct 2011 21:04:40 +0000 (23:04 +0200)
committerChristian Hofstaedtler <ch@grml.org>
Wed, 12 Oct 2011 21:12:58 +0000 (23:12 +0200)
This way we no longer need to distribute grml.ogg!

debian/control
usr_bin/soundtest

index 1fc273a..076277d 100644 (file)
@@ -14,7 +14,7 @@ Bugs: mailto:bugs@grml.org
 Package: grml-scripts
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, less, dialog, perl, zsh, dash, links | w3m | links2, screen, grml-network, grml-etc-core, libterm-readkey-perl, lockfile-progs, grml-scripts-core
 Package: grml-scripts
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, less, dialog, perl, zsh, dash, links | w3m | links2, screen, grml-network, grml-etc-core, libterm-readkey-perl, lockfile-progs, grml-scripts-core
-Suggests: ruby, python, grml-x, ipcalc, hwinfo, antiword, grml-etc, grml-rebuildfstab, grml-files, grml-hwinfo, pptp-linux, flite, wmii, mutt, slrn, grml-docs, grml-autoconfig, dirvish, sudo, idesk, xlockmore, python-dbus, notification-daemon, grml-quickconfig, lzop
+Suggests: ruby, python, grml-x, ipcalc, hwinfo, antiword, grml-etc, grml-rebuildfstab, grml-files, grml-hwinfo, pptp-linux, flite, wmii, mutt, slrn, grml-docs, grml-autoconfig, dirvish, sudo, idesk, xlockmore, python-dbus, notification-daemon, grml-quickconfig, lzop, alsa-utils
 Breaks: grml-autoconfig (<< 0.9.19)
 Description: Scripts for the Grml system for an easier life
  Some scripts which should make life easier.
 Breaks: grml-autoconfig (<< 0.9.19)
 Description: Scripts for the Grml system for an easier life
  Some scripts which should make life easier.
index 101daa4..6146df7 100755 (executable)
@@ -6,42 +6,11 @@
 # License:       This file is licensed under the GPL v2.
 ################################################################################
 
 # License:       This file is licensed under the GPL v2.
 ################################################################################
 
-PN=`basename "$0"`
-
-if [ -z "$PLAYER" ] ; then
-   [ -x /usr/bin/mplayer ] && PLAYER="mplayer"
-   [ -x /usr/bin/ogg123 ]  && PLAYER="ogg123"
-fi
-
-if ! [ $(which $PLAYER) ] ; then
-   echo "Sorry, neither mplayer nor ogg123 available and \$PLAYER is not set.">&2
-   exit 1
+if ! [ $(which speaker-test) ] ; then
+  echo "Sorry, speaker-test (from alsa-utils) not available.">&2
+  exit 1
 fi
 
 fi
 
-if [ -z "$1" ] ; then
-   FILE="/usr/share/grml/effect.ogg"
-else
-   FILE="$*"
-fi
-
-if ! [ -r "$FILE" ] ; then
-   echo "Sorry, /usr/share/grml/effect.ogg of package grml-files not available.">&2
-   exit 1
-fi
-
-echo "$PN - trying to play $FILE with $PLAYER
-
-You do not hear anything? Make sure volume is not turned off.
-Adjust mixer settings via aumix or alsamixer.
-
-Tip: $PN supports some options.
-Just provide the file(s) you want to play as argument(s),
-adjust player which should be used for playing the files
-via environment variable PLAYER. Usage example:
-
-  PLAYER=mplayer $PN /usr/share/grml/effect.ogg /another/file/to/play.mp3
-"
-
-$PLAYER $FILE && echo "It looks like sound works for you. :-)" || echo "problems with sound? :-("
+exec speaker-test -t wav
 
 ## END OF FILE #################################################################
 
 ## END OF FILE #################################################################