Subject: Re: XFree86: beep to speakers?
To: None <port-i386@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 03/21/2003 19:38:05
>> Can anyone point me in the right direction to make XFree86 beep to
>> the external speakers instead of (or in addition to) to system
>> speaker?

> I don't think X will beep to anything.

Um?  X has _something_ to beep to, surely.

> Are you trying to get xterms to alarm to system speaker, or what?

As I read it, the desire is to get them to beep "to the external
speakers instead of (or in addition to) the system speaker".

I just had a look.  Beeps are generated with ioctl()s on a file
descriptor that presumably is connected to the console - it's kept in a
field called consoleFd.

The simplest thing I see is to just add code to xf86SoundKbdBell
(perhaps ripping out the code that's there) to send the beep to
/dev/audio.  (If you expect to use /dev/audio for anything else at the
same time, you will have some multiplexing issues; I don't know whether
the kernel can be made to deal with them or you'll have to build a
userland gadget for it.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B