Controlling the PC Speaker from Delphi 3
Posted on 1998-06-16
In the good old days of dos 2.1. One could give a command "sound" and the PC-speaker would start making a noise untill it is stopped. Now things are different. We tell windows 95 we want a beep, it goes and determines the sound card and the type of sound the user configured and does the rest for you.
Unfortunately, the PC-speaker beep, ie, there is no sound card, is very soft and short. When one puts this in a heavy duty box, behind a panel, it cannot be heard. This is my problem.
HOW DO I SPECIFY THE FREQUENCY AND DURATION OF A PC-SPEAKER BEEP IN WIN95
I tried messagebeep, these all amounts to exactly the same sound. I tried two different Beep procedures, the one is without parameters and gives the same beep. The other beep procedure takes two parameters that the help says is used by Win NT, but ignored by Win95. Yes, it gives me the beep that is exactly the same as all the others.
There is one thing that starts approaching an answer, that is calling something like ten of these Beep's after the other, but it is not what one can discribe as a smooth solution. (And wastes time in an application that is already time criticcal.)