repairs for new injector API in air guitar script

This commit is contained in:
Stephen Birarda 2015-02-11 16:17:10 -08:00
parent 6a5c0fd9f2
commit d8646f6ea0

View file

@ -85,10 +85,10 @@ function checkHands(deltaTime) {
var chord = Controller.getTriggerValue(chordHand);
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
print("stopped sound");
Audio.stopInjector(soundPlaying);
soundPlaying.stop();
}
var BUTTON_COUNT = 6;
@ -132,9 +132,9 @@ function checkHands(deltaTime) {
}
function playChord(position, volume) {
if (Audio.isInjectorPlaying(soundPlaying)) {
if (soundPlaying.isPlaying()) {
print("stopped sound");
Audio.stopInjector(soundPlaying);
soundPlaying.stop();
}
print("Played sound: " + whichChord + " at volume " + options.volume);