문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top