This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
This article needs: Needs basic examples of both online and local file playback
Note: Audio clips are loaded into memory in uncompressed form and could potentially consume a lot of memory. playClip() is best used for short Sound FX clips. Use playStream() for long-playing soundtracks/ambient sounds.
playClip(uri) playClip(uri, cycleCount) playClip(uri, cycleCount, volume)
uri- The uri/url of the file. For example, http://www.mywebsite/mysong.mp3 or file:/C:/mysong.mp3
cycleCount- The number of times the audio should play. If set to 0, the file is cached but not played; if set to -1, the file is played continuously. Defaults to 1.
volume- The volume the audio is to be played at. Can range from 0 to 1. Defaults to 1.
To play the song, the GM can then use execLink:
[H: songUrl = "http://erinmcnamee.com.hostbaby.com/files/07_No_Sorrow__Banish_Misfortune.mp3"] [H: audioByte = macroLinkText("playSong@Lib:MusicPlayer", "none", songUrl)] [H: execLink(audioByte,0,"all")]
Dropbox URLsAfter creating the dropbox share link you have to replace
dl.dropboxusercontent.com. That provides a direct link that playClip can use. Thanks to Full Bleed on the forums for the tip.