[comp.sys.ibm.pc] Muffled PC music

wales@valeria.cs.ucla.edu (Rich Wales) (09/16/88)

In article <11046@grebyn.COM> marv@grebyn (Marvin Raab) writes:

	Here's one I can't figure out: Why does my computer
	screw up Procomm and Pcplus sounds *sometimes*?
	(The sounds sound like they're muffled.)

There is apparently a generic flaw in the sound generator hardware (8253
timer chip and/or the associated circuitry).  The symptom is that cer-
tain sequences of commands to the sound generator (via I/O ports 43H and
42H) will cause it to "click" when sound is turned on and off (via I/O
port 61H), instead of generating a tone.

I am aware of this problem in the IBM PC, PC/XT, and many (most) clones.
It apparently does not exist in the PC/AT or AT-clones -- presumably
because the AT uses a different chip set.

I'm still not totally certain what command sequences put the sound gen-
erator into this "clicking" mode.  However, a reliable way for a program
that wants to do music to "immunize" itself against the problem is for
the program to set the frequency (time interval) for a desired tone
*TWICE* instead of only once.  Apparently, once the 8253 timer chip has
had the time interval set at least twice, the old state that resulted in
the "clicking" will have cleared itself up.

Obviously, this "fix" is not much help for a canned program.  But some-
thing I've also found to work in these cases is to do an "ECHO ^G" (ring
the bell) command after running one of the programs that mess up the
timer.  (I am using NANSI.SYS; I'm not sure whether "ECHO ^G" will clear
up the problem if you're running another ANSI driver.)

-- Rich Wales // UCLA Computer Science Department // +1 (213) 825-5683
   3531 Boelter Hall // Los Angeles, California 90024-1596 // USA
   wales@CS.UCLA.EDU      ...!(uunet,ucbvax,rutgers)!cs.ucla.edu!wales
   "No, the name of my ship is the _Lollipop_.  It's a good ship."