VRFS-2498 : Fix tempo and sound strings for initial metronome opening.
This commit is contained in:
parent
d9d3e67fc5
commit
a4d8ea5f60
|
|
@ -2174,8 +2174,8 @@
|
|||
} else {
|
||||
rest.openMetronome({id: sessionModel.id()})
|
||||
.done(function() {
|
||||
context.JK.CurrentSessionModel.refreshCurrentSession(true)
|
||||
setMetronomeFromForm()
|
||||
context.JK.CurrentSessionModel.refreshCurrentSession(true)
|
||||
})
|
||||
.fail(function(jqXHR) {
|
||||
console.log(jqXHR, jqXHR)
|
||||
|
|
@ -2334,9 +2334,23 @@
|
|||
}
|
||||
|
||||
function setMetronomeFromForm() {
|
||||
var sound = $("select.metro-sound:visible option:selected").val()
|
||||
var tempo = $("select.metro-tempo:visible option:selected").val()
|
||||
context.jamClient.SessionSetMetronome(tempo, sound, 1, 0)
|
||||
var sound = $("select.metro-sound:visible option:selected").val()
|
||||
|
||||
var t = parseInt(tempo);
|
||||
var s;
|
||||
if (tempo==NaN || tempo==0 || tempo==null) {
|
||||
t = 120
|
||||
}
|
||||
|
||||
if (sound==null || typeof(sound)=='undefined' || sound=="") {
|
||||
s = "click"
|
||||
} else {
|
||||
s = sound
|
||||
}
|
||||
|
||||
console.log("Setting tempo and sound:", t, s)
|
||||
context.jamClient.SessionSetMetronome(t, s, 1, 0)
|
||||
}
|
||||
|
||||
function onMetronomeChanged(e, data) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue