Depend on console-tools; drop runit
[grml-scripts.git] / usr_bin / soundtest
1 #!/bin/sh
2 # Filename:      soundtest
3 # Purpose:       test sound on your grml system
4 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2.
7 # Latest change: Sun Jan 15 22:46:13 CET 2006 [mika]
8 ################################################################################
9
10 PN=`basename "$0"`
11 [ -z "$PLAYER" ] && PLAYER="ogg123"
12 if [ -z "$1" ] ; then
13   FILE="/usr/share/grml/effect.ogg"
14 else
15   FILE="$*"
16 fi
17
18 echo "$PN - trying to play $FILE with $PLAYER
19
20 You do not hear anything? Make sure volume is not turned off.
21 Adjust mixer settings via aumix or alsamixer.
22
23 Tip: $PN supports some options.
24 Just provide the files you want to play as arguments,
25 adjust player which should be used for playing the files
26 via environment variable PLAYER. Usage example:
27
28   PLAYER=mp3blaster $PN /usr/share/grml/effect.ogg /another/file/to/play.mp3
29 "
30
31 $PLAYER $FILE && echo "It looks like sound works for you. :-)" || echo "problems with sound? :-("
32
33 ## END OF FILE #################################################################