This shows you the differences between two versions of the page.
mgl:functionreferencesound [2008/11/08 11:46] |
mgl:functionreferencesound [2009/12/01 21:35] |
||
---|---|---|---|
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). | ||
- | |||
- |