[comp.sys.ibm.pc] Request for program to turn PC speaker ON and OFF

perkins@bnrmtv.UUCP (Henry Perkins) (06/26/87)

While I agree that a program which would let you disable your
PC's speaker would be nice to have, it just isn't possible to
create.

A program causes sound to come out of the speaker by sending
bytes to an output port.  After that, a timer chip may keep
the sound going.  Apart from hardware solutions (stuffing
cotton in the speaker, for instance), all you could do is have
a program that would turn the speaker off every timer tick
(that's 18.2 times per second).  This isn't too difficult to
create, but won't work if programs disable interrupts while
they play with the speaker (more than likely, I'm afraid), and
you'd still get a little blip of sound before it is cut off.

The usual way of making a beep is to send a CTRL-G (ASCII bell
code) to the "Write TTY" interrupt function.  It IS possible
to ensure that these beeps don't occur.  I've made a program
which makes short beeps instead of the standard long ones, and
it would be trivial to have the program make no beep at all.

If anybody wants one or more of these programs, send me mail
and I'll be happy to provide them.  If I get enough responses,
I'll post them instead.  Please indicate if you can use
assembler source, or if you need a uuencoded .COM file.
-- 
{hplabs,amdahl,3comvax}!bnrmtv!perkins        --Henry Perkins

It is better never to have been born.  But who among us has such luck?
One in a million, perhaps.

psfales@ihlpe.UUCP (06/29/87)

 In article <2069@bnrmtv.UUCP>, perkins@bnrmtv.UUCP (Henry Perkins) writes:
 > While I agree that a program which would let you disable your
 > PC's speaker would be nice to have, it just isn't possible to
 > create.
	...
 > The usual way of making a beep is to send a CTRL-G (ASCII bell
 > code) to the "Write TTY" interrupt function.  It IS possible
 > to ensure that these beeps don't occur.  I've made a program
 > which makes short beeps instead of the standard long ones, and
 > it would be trivial to have the program make no beep at all.

I am currently using the FANSI-CONSOLE driver - One of its features is 
the ability to control the length of the bell.  I find a very short bell
(almost more of a click) to be much more pleasant.  However, as you say
any programs that make their own beeps are unaffected.

-- 
Peter Fales		UUCP:	...ihnp4!ihlpe!psfales
			work:	(312) 979-7784
				AT&T Information Systems, IW 1Z-243
				1100 E. Warrenville Rd., IL 60566