mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-27 16:18:46 +02:00
repairs for new injector API in air guitar script
This commit is contained in:
parent
6a5c0fd9f2
commit
d8646f6ea0
1 changed files with 4 additions and 4 deletions
|
@ -85,10 +85,10 @@ function checkHands(deltaTime) {
|
||||||
var chord = Controller.getTriggerValue(chordHand);
|
var chord = Controller.getTriggerValue(chordHand);
|
||||||
|
|
||||||
if (volume > 1.0) volume = 1.0;
|
if (volume > 1.0) volume = 1.0;
|
||||||
if ((chord > 0.1) && Audio.isInjectorPlaying(soundPlaying)) {
|
if ((chord > 0.1) && soundPlaying.isPlaying()) {
|
||||||
// If chord finger trigger pulled, stop current chord
|
// If chord finger trigger pulled, stop current chord
|
||||||
print("stopped sound");
|
print("stopped sound");
|
||||||
Audio.stopInjector(soundPlaying);
|
soundPlaying.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
var BUTTON_COUNT = 6;
|
var BUTTON_COUNT = 6;
|
||||||
|
@ -132,9 +132,9 @@ function checkHands(deltaTime) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function playChord(position, volume) {
|
function playChord(position, volume) {
|
||||||
if (Audio.isInjectorPlaying(soundPlaying)) {
|
if (soundPlaying.isPlaying()) {
|
||||||
print("stopped sound");
|
print("stopped sound");
|
||||||
Audio.stopInjector(soundPlaying);
|
soundPlaying.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
print("Played sound: " + whichChord + " at volume " + options.volume);
|
print("Played sound: " + whichChord + " at volume " + options.volume);
|
||||||
|
|
Loading…
Reference in a new issue