mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 03:22:27 +02:00
add test content
This commit is contained in:
parent
f65f99a3e0
commit
1fb8f659a7
2 changed files with 18 additions and 0 deletions
BIN
script-archive/tests/audio/1760sine.wav
Normal file
BIN
script-archive/tests/audio/1760sine.wav
Normal file
Binary file not shown.
18
script-archive/tests/audio/testPeakLimiter.js
Normal file
18
script-archive/tests/audio/testPeakLimiter.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
var audioOptions = {
|
||||
volume: 1.0,
|
||||
loop: true,
|
||||
position: MyAvatar.position
|
||||
}
|
||||
|
||||
var sineWave = Script.resolvePath("./1760sine.wav");
|
||||
var sound = SoundCache.getSound(sineWave);
|
||||
var injectorCount = 0;
|
||||
var MAX_INJECTOR_COUNT = 40;
|
||||
|
||||
Script.update.connect(function() {
|
||||
if (sound.downloaded && injectorCount < MAX_INJECTOR_COUNT) {
|
||||
injectorCount++;
|
||||
print("stating injector:" + injectorCount);
|
||||
Audio.playSound(sound, audioOptions);
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue