Date: 12 Nov 2002 11:55:04 -0800 From: swear@attbi.com (Gary W. Swearingen) To: Chris P <freebsd@rawfire.torche.com> Cc: freebsd-questions@FreeBSD.org Subject: Re: Beep question... Message-ID: <niwuniftrb.uni@localhost.localdomain> In-Reply-To: <Pine.BSF.4.44.0211120101510.60786-100000@rawfire.torche.com> References: <Pine.BSF.4.44.0211120101510.60786-100000@rawfire.torche.com>
index | next in thread | previous in thread | raw e-mail
Chris P <freebsd@rawfire.torche.com> writes:
> If anyone knows, I'd appreciate the info! Thanks!
Someone already answered your question as it applies to the PC's case
speaker so I'll show you how I do beeping with the external speaker(s).
The audio/aumix port must be installed and you'll have to locate
some other sound files (eg with "locate \.au").
#!/bin/ksh
## Usage: beep [-cowbell] [_count_]
if [ "$1" = -cowbell ]; then
shift
SOUND=/xxx/share/sounds/old-emacs/cowbell.au
else
SOUND=/xxx/share/sounds/old-emacs/wallsoff.au
fi
if [ "$1" = "" ];then
beeps=1
else
beeps=$1
fi
NEWVOL=100
while [ 1 = 1 ]; do
OLDVOL=$(aumix -vq|cut -d ' ' -f 3)
aumix -v "$NEWVOL"
cat "$SOUND" >/dev/audio
aumix -v "$OLDVOL"
beeps=$((beeps-1))
if [ $beeps = 0 ]; then
break
fi
# sleep 1 ## for slower beeping
done
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?niwuniftrb.uni>
