Difference between revisions of "PlaySound"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function PlaySound(FileName: string): Boolean; </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Plays a sou...")
 
 
(4 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
<source lang="scar">
 
<source lang="scar">
 
begin
 
begin
   WriteLn(Abs(1.1));
+
   PlaySound('C:\Windows\Media\tada.wav');
  WriteLn(Abs(-1.1));
 
 
end.
 
end.
 
</source>
 
</source>
 
Output:
 
1,1
 
1,1
 
  
 
==See Also==
 
==See Also==
Line 27: Line 22:
  
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Math Functions]]
+
[[Category:Sound Functions]]
 +
[[Category:File Functions]]

Latest revision as of 13:12, 1 July 2011

Definition

function PlaySound(FileName: string): Boolean;

Availability

SCAR Divi 3.00 > Current

Description

Plays a sound file specified by FileName, it only support wave files. Returns false if the file does not exist, if it exists but is not a wave file, it still returns true.

Example

begin
  PlaySound('C:\Windows\Media\tada.wav');
end.

See Also