Dennis Clarke wrote:

This may seem like a silly question.

On your average machine these days there is generally a small speaker in
there somewhere.  This may not be true for telco gear or embedded gear or
blades but certainly your average PC type gear.

On a machine I have here I see this :

# ls -lap /dev/audio
/dev/audio: No such file or directory

Now I know that when I issue a shutdown command I generally get a beep
out of the box.  At some point.  Is there a snippit of code in there
somewhere ( 30 million lines of it ) that creates this "beep" ?

/usr/bin/printf '\a' should do it.

If you want the deep and dirty C code, this is how the X server does it
when using the keyboard bell (so called since it used to be in the keyboard,
but isn't anymore with most USB keyboards):

http://cvsweb.freedesktop.org/xorg/xserver/xorg/hw/xfree86/os-support/solaris/sun_kbd.c?rev=1.7&view=markup

(See sunKbdSoundBell function - short summary is ioctl on /dev/kbd of type
 KIOCCMD with arguments of KBD_CMD_BELL to turn on and KBD_CMD_NOBELL to turn
 off when done.)

--
        -Alan Coopersmith-           [EMAIL PROTECTED]
         Sun Microsystems, Inc. - X Window System Engineering
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to