mirror of
https://github.com/lubosz/overte.git
synced 2025-08-17 04:33:54 +02:00
use injector restart in airGuitar script
This commit is contained in:
parent
5f4e3528c2
commit
70e085009b
1 changed files with 9 additions and 4 deletions
|
@ -138,10 +138,15 @@ function playChord(position, volume) {
|
||||||
}
|
}
|
||||||
|
|
||||||
print("Played sound: " + whichChord + " at volume " + options.volume);
|
print("Played sound: " + whichChord + " at volume " + options.volume);
|
||||||
soundPlaying = Audio.playSound(chords[guitarSelector + whichChord], {
|
if (!soundPlaying) {
|
||||||
position: position,
|
soundPlaying = Audio.playSound(chords[guitarSelector + whichChord], {
|
||||||
volume: volume
|
position: position,
|
||||||
});
|
volume: volume
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
soundPlaying.restart();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function keyPressEvent(event) {
|
function keyPressEvent(event) {
|
||||||
|
|
Loading…
Reference in a new issue