mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 12:09:52 +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) {
|
function playChord(position, volume) {
|
||||||
var options = new AudioInjectionOptions();
|
|
||||||
options.position = position;
|
|
||||||
options.volume = volume;
|
|
||||||
if (Audio.isInjectorPlaying(soundPlaying)) {
|
if (Audio.isInjectorPlaying(soundPlaying)) {
|
||||||
print("stopped sound");
|
print("stopped sound");
|
||||||
Audio.stopInjector(soundPlaying);
|
Audio.stopInjector(soundPlaying);
|
||||||
}
|
}
|
||||||
|
|
||||||
print("Played sound: " + whichChord + " at volume " + options.volume);
|
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) {
|
function keyPressEvent(event) {
|
||||||
|
|
Loading…
Reference in a new issue