Domanda

I try to use Sound(x) command with different "x" values, but it only shows a beep, same sound.

program Sounds;
uses
   crt;

begin
   Sound(1000);
   Sound(500);
   Delay(1000);
   Sound(300);
   Sound(150);
   Delay(1000);
   NoSound;
end.

What's wrong with this code?

È stato utile?

Soluzione

Sound does not work on Windows anymore.

I made a patch that works on some systems, but they did not really care about it.

--

Sound makes a sound forever / till NoSound is called. If you only want to make a sound for a certain duration you can use Beep(freq, duration) from the windows unit

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top