mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 20:07:07 +02:00
Add playSoundWave.js
This commit is contained in:
parent
aa47043d57
commit
ca6cc86ca1
1 changed files with 22 additions and 0 deletions
22
examples/playSoundWave.js
Normal file
22
examples/playSoundWave.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
// playSoundWave.js
|
||||
// examples
|
||||
//
|
||||
// Created by Ryan Huffman on 05/27/14.
|
||||
// Copyright 2014 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
var soundClip = new Sound("https://s3-us-west-1.amazonaws.com/highfidelity-public/sounds/Cocktail%20Party%20Snippets/Walken1.wav");
|
||||
|
||||
function playSound() {
|
||||
var options = new AudioInjectionOptions();
|
||||
var position = MyAvatar.position;
|
||||
options.position = position;
|
||||
options.volume = 0.5;
|
||||
Audio.playSound(soundClip, options);
|
||||
}
|
||||
|
||||
Script.setInterval(playSound, 10000);
|
Loading…
Reference in a new issue