Wasn't able to get this to work in Qemu, maybe the following assumption made by the wiki page doesn't apply to emulators?Playing the Audio
When the PIT interrupts you you need to program PIT timer 2 so that it puts the PC Speaker in the "out" position for a fraction of 60 microseconds. For 8 bit audio the number of microseconds can be calculated like this:
microseconds = (sample * 60) / 255;
For more information see the Wikipedia article Pulse-width modulation. There is also sample code posted in the forum here.
Based on my "research", without this kind of trick, it will be extremely dfficult to play a simple wav file through the eumlated pc speaker.The PC Speaker takes approximately 60 millionths of a second to change positions.
Could there be another short cut that I somehow overlooked?