From owner-freebsd-questions Tue Nov 12 11:56:59 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96E8437B401 for ; Tue, 12 Nov 2002 11:56:57 -0800 (PST) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A49743E42 for ; Tue, 12 Nov 2002 11:56:55 -0800 (PST) (envelope-from swear@attbi.com) Received: from localhost.localdomain ([12.242.158.67]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021112195654.XNNH24365.rwcrmhc51.attbi.com@localhost.localdomain>; Tue, 12 Nov 2002 19:56:54 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost.localdomain (8.12.6/8.12.5) with ESMTP id gACJtAd8046376; Tue, 12 Nov 2002 11:55:10 -0800 (PST) (envelope-from swear@attbi.com) Received: (from jojo@localhost) by localhost.localdomain (8.12.6/8.12.5/Submit) id gACJt4Vf046373; Tue, 12 Nov 2002 11:55:04 -0800 (PST) (envelope-from swear@attbi.com) X-Authentication-Warning: localhost.localdomain: jojo set sender to swear@attbi.com using -f To: Chris P Cc: freebsd-questions@FreeBSD.org Subject: Re: Beep question... References: From: swear@attbi.com (Gary W. Swearingen) Date: 12 Nov 2002 11:55:04 -0800 In-Reply-To: Message-ID: Lines: 34 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Chris P 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