Created
January 27, 2016 21:53
-
-
Save huffman/f11b0705ccd09a766e47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = "http://hifi-content.s3.amazonaws.com/DomainContent/Junkyard/Sounds/streetparty3.L.wav"; | |
var sound = SoundCache.getSound(url); | |
var id = Script.setInterval(function() { | |
print("Checking audio..."); | |
if (sound.downloaded) { | |
Script.clearInterval(id); | |
print("Starting audio..."); | |
Audio.playSound(sound, { | |
position: { x: 0, y: 0, z: 0 }, | |
volume: 0.5, | |
loop: true | |
}); | |
} | |
}, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment