Controlling the PC speaker?


K

KimmoA

Is there any C library out there dealing with the PC speaker? I have
always wanted to play around with it and make it do noises!

What did all those old games use? They had advanced sound effects using
this primitive sound output. Surely not all of them hacked around with
Assembler? Or did they?

I have tried asking people and searching for such a library/document
for a long time without any luck whatsoever.

printf("\a"); // Too limiting! ;)
 
Ad

Advertisements

S

Spiros Bousbouras

KimmoA said:
Is there any C library out there dealing with the PC speaker? I have
always wanted to play around with it and make it do noises!

No standard C library. Therefore you need to ask
this in a group dedicated to your platform.
 
Ad

Advertisements

J

jmcgill

KimmoA said:
Is there any C library out there dealing with the PC speaker? I have
always wanted to play around with it and make it do noises!

What did all those old games use? They had advanced sound effects using
this primitive sound output. Surely not all of them hacked around with
Assembler? Or did they?

Of course we did. 1-bit PWM through port 61H, driven by the timer on 42h.

http://fly.cc.fer.hr/GDM/articles/sndmus/speaker1.html
http://fly.cc.fer.hr/GDM/articles/sndmus/speaker2.html

Adventurous musicians made DAC's for the printer port... Somewhere I
have a schematic and driver for an 8-bit DAC... I even used it as a
synth in a composition for a university project, which I had forgotten
about until your message reminded me.

I never actually plugged in the speaker after I got a machine to POST
the first time. I can't stand the boards with a surface-mounted piezo
buzzer that can't be removed. A little drop of epoxy silences those.

Followup-To: set to a msdos group...
 

Top