From: dvs@ze8.rz.uni-duesseldorf.de (Wolfgang R. Mueller) Subject: au-play via int? [Was: Linux Device Driver Tutorial truncated!!!] Date: Wed, 21 Apr 1993 07:30:56 GMT
In article <735291006.17532.0@unix3.andrew.cmu.edu> Frank T Lofaro <fl0p+@andrew.cmu.edu> writes:
>that can play audio files on a PC speaker. One problem I have is that I don't
>really know how to get my driver to be run the required 9000 (?) times per
>second though. :P ).
You need to run it 18000 times per second or else the high pitch noise at
9000 Hz (which is inevitable from the pulse length coding technique) will
dominate any useful sound !
You will have to modfiy the clock tic counter ~1.17mio/HZ from HZ=100
to HZ=18000 and run the previous clock tic server only in every 180th case,
but at a lower priority, so that the next audio tics may proceed.
I doubt whether 18000 interrupt services per second can be realistically
done on slower machines under a multitasking OS like Linux (though the
original MSDOS version of the mushroom program did it successfully even
on a 4.77 MHz XT).
Hope this helps,
Wolfgang R. Mueller <dvs@ze8.rz.uni-duesseldorf.de>,
Computing Centre, Heinrich-Heine-University, Duesseldorf, Germany.