Improved sound loop example script

No I mean setting velocity, gravity, and damping. 

> On Sep 15, 2014, at 8:59 PM, Philip Rosedale <notifications@github.com> wrote:
> 
> In examples/playSoundLoop.js:
> 
> > -            options.position = MyAvatar.position;
> > -            options.volume = 0.5;
> > -            options.loop = true;
> > -            soundPlaying = Audio.playSound(sound, options);
> > -            print("Started sound loop");
> > -        } else {
> > -            Audio.stopInjector(soundPlaying);
> > -            print("Stopped sound loop");
> > -        }
> > +function maybePlaySound(deltaTime) {
> > +    if (sound.downloaded) {
> > +        var properties = {
> > +                type: "Sphere",
> > +                position: options.position, 
> > +                velocity: { x: 0, y: 0, z: 0}, 
> > +                gravity: { x: 0, y: 0, z: 0}, 
> do you mean using the update loop to check for the download completing? Unfortunately it seems to be. I tried two other things and both were a problem:
> 
> Simply loading and calling playSound() immediately in body of script. No sound is heard, it seems to fail silently because the download is still ongoing.
> 
> Using a while loop without inner code to wait for the finish of download... while (!sound.downloaded) {}. That seems to hang the script, no sound, and script cannot be stopped from the active scripts window.
> 
> —
> Reply to this email directly or view it on GitHub.