Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mgl:functionreferencesound [2009/06/11 01:21]
127.0.0.1 external edit
mgl:functionreferencesound [2009/12/02 05:35] (current)
justin
Line 1: Line 1:
 ====== Sound functions ====== ====== Sound functions ======
- 
 ===== mglInstallSound:​ Install an .aiff file for playing with mglPlaySound ===== ===== mglInstallSound:​ Install an .aiff file for playing with mglPlaySound =====
  
Line 16: Line 15:
  
   mglInstallSound   mglInstallSound
 +==== Version 2.0 ====
 +You can also specify a directory of sound files to install:
 +
 +  mgInstallSound('​soundDir'​);​
 +
 +which will install all sounds named *.aif or *.aiff. You can play the sounds by specifying the name of the file (without the file extension):
 +
 +  mglPlaySound('​soundFileName'​);​
 +
  
 ===== mglPlaySound:​ Play a system sound ===== ===== mglPlaySound:​ Play a system sound =====
Line 35: Line 43:
  
 Note that this function returns right after it starts playing the sound (it does not wait until the sound finishes playing). Note that this function returns right after it starts playing the sound (it does not wait until the sound finishes playing).
- 
-