Sound procedure
PC Speaker sound routines
Return to Introduction  Previous page  Next page
Unit
acUtils  

Declaration
procedure Sound(Hz: Word);  

Description
The Sound procedure starts the internal speaker. Hz specifies the frequency of the emitted sound in hertz. The speaker continues until explicitly turned off by a call to NoSound.  

Example
The following program fragment emits a 440-hertz tone for half a second:  
uses acUtils;  
begin  
  Sound(440);        { Beep }  
  Delay(500);        { For 500 ms }  
  NoSound;           { Relief! }  
end.  

See also
NoSound and Delay procedures.