From d8646f6ea05a23fd09796f0943582d9781b88811 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 11 Feb 2015 16:17:10 -0800 Subject: [PATCH] repairs for new injector API in air guitar script --- examples/controllers/hydra/airGuitar.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/controllers/hydra/airGuitar.js b/examples/controllers/hydra/airGuitar.js index 29ab2f9c44..6f5a259ecd 100644 --- a/examples/controllers/hydra/airGuitar.js +++ b/examples/controllers/hydra/airGuitar.js @@ -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);