mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 22:13:29 +02:00
update airGuitar.js to new AudioInjectionOptions format
This commit is contained in:
parent
a8681cd5b6
commit
05174ffdf3
1 changed files with 5 additions and 4 deletions
|
@ -132,15 +132,16 @@ function checkHands(deltaTime) {
|
|||
}
|
||||
|
||||
function playChord(position, volume) {
|
||||
var options = new AudioInjectionOptions();
|
||||
options.position = position;
|
||||
options.volume = volume;
|
||||
if (Audio.isInjectorPlaying(soundPlaying)) {
|
||||
print("stopped sound");
|
||||
Audio.stopInjector(soundPlaying);
|
||||
}
|
||||
|
||||
print("Played sound: " + whichChord + " at volume " + options.volume);
|
||||
soundPlaying = Audio.playSound(chords[guitarSelector + whichChord], options);
|
||||
soundPlaying = Audio.playSound(chords[guitarSelector + whichChord], {
|
||||
position: position,
|
||||
volume: volume
|
||||
});
|
||||
}
|
||||
|
||||
function keyPressEvent(event) {
|
||||
|
|
Loading…
Reference in a new issue