* VRFS-1308 - make configure tracks be cool about no selected items when the user indicates they might want to configure them. fix some recording styling button issues

This commit is contained in:
Seth Call 2014-03-06 11:02:50 -06:00
parent 64b8f7d001
commit 0d27a47b42
6 changed files with 928 additions and 854 deletions

View File

@ -197,7 +197,7 @@ module JamRuby
locidispid = connection.locidispid
query = MusicSession
.select("music_sessions.*, max(coalesce(scores.score, 99)) as max_score")
.select("music_sessions.*, max(coalesce(scores.score, 99)) as max_score")
.joins(
%Q{
INNER JOIN

View File

@ -339,7 +339,6 @@ describe MusicSession do
music_sessions.length.should == 2
music_sessions[0].id.should == later_session.id
music_sessions[1].id.should == earlier_session.id
end
end

File diff suppressed because it is too large Load Diff

View File

@ -57,7 +57,7 @@
// Unsubscribe from FTUE VU callbacks.
jamClient.FTUERegisterVUCallbacks('', '', '');
if(!successfulFtue && app.cancelFtue) {
if (!successfulFtue && app.cancelFtue) {
app.cancelFtue();
app.afterFtue = null;
app.cancelFtue = null;
@ -98,7 +98,7 @@
}
// renders volumes based on what the backend says
function renderVolumes() {
function renderVolumes() {
$.each(context._.keys(faderReadMap), function (index, faderId) {
// faderChange takes a value from 0-100
var $fader = $('[fader-id="' + faderId + '"]');
@ -127,9 +127,9 @@
}
function checkValidStateForTesting() {
var reqMissing = !musicInAndOutSet() || currentAudioDriverId == null || currentAudioDriverId == '';
var reqMissing = !musicInAndOutSet() || currentAudioDriverId == null || currentAudioDriverId == '';
if(reqMissing ) {
if (reqMissing) {
renderDisableTest();
}
else {
@ -465,8 +465,7 @@
];
var optionsHtml = '';
var deviceOptionFunc = function (deviceKey, index, list) {
optionsHtml += '<option title="' + devices[deviceKey] + '" value="' + deviceKey + '">' +
devices[deviceKey] + '</option>';
optionsHtml += '<option title="' + devices[deviceKey] + '" value="' + deviceKey + '">' + devices[deviceKey] + '</option>';
};
for (var i = 0; i < funcs.length; i++) {
optionsHtml = '<option selected="selected" value="">Choose...</option>';
@ -499,18 +498,24 @@
*/
function loadAudioDrivers() {
var drivers = jamClient.FTUEGetDevices(false);
var voiceDrivers = jamClient.FTUEGetChatInputs();
var driverOptionFunc = function (driverKey, index, list) {
optionsHtml += '<option title="' + drivers[driverKey] + '"value="' + driverKey + '">' +
drivers[driverKey] + '</option>';
if(!drivers[driverKey]) {
logger.debug("skipping unknown device:", driverKey)
}
else {
optionsHtml += '<option title="' + drivers[driverKey] + '"value="' + driverKey + '">' + drivers[driverKey] + '</option>';
}
};
var optionsHtml = '<option selected="selected" value="">Choose...</option>';
var selectors = [
'[layout-wizard-step="0"] .settings-2-device select',
'[layout-wizard-step="0"] .settings-2-voice select',
'[layout-wizard-step="2"] .settings-driver select'
];
// handle standard devices
var sortedDeviceKeys = context._.keys(drivers).sort();
context._.each(sortedDeviceKeys, driverOptionFunc);
$.each(selectors, function (index, selector) {
@ -519,6 +524,19 @@
$select.html(optionsHtml);
context.JK.dropdown($select);
});
selectors = ['[layout-wizard-step="0"] .settings-2-voice select'];
var sortedVoiceDeviceKeys = context._.keys(voiceDrivers).sort();
// handle voice inputs
context._.each(sortedVoiceDeviceKeys, driverOptionFunc);
$.each(selectors, function (index, selector) {
var $select = $(selector);
$select.empty();
$select.html(optionsHtml);
context.JK.dropdown($select);
});
}
/** Once a configuration is decided upon, we set the user's default instrument based on data from their profile */
@ -574,10 +592,11 @@
// used in a .change event in a select to allow the select to reliably close
// needed because ftue testing blocks the UI
function releaseDropdown(proc) {
setTimeout(function() {
setTimeout(function () {
proc()
}, 1)
}
// Handler for when the audio device is changed in the new FTUE screen
// This works differently from the old FTUE. There is no input/output selection,
// as soon as the user chooses a driver, we auto-assign inputs and outputs.
@ -585,7 +604,7 @@
// { latency: 11.1875, latencyknown: true, latencyvar: 1}
function newFtueAudioDeviceChanged(evt) {
releaseDropdown(function() {
releaseDropdown(function () {
renderStartNewFtueLatencyTesting();
var $select = $(evt.currentTarget);
@ -667,7 +686,7 @@
}
function newFtueSave(persist) {
console.log("newFtueSave persist(" +persist+ ")")
console.log("newFtueSave persist(" + persist + ")")
newFtueUpdateLatencyView('loading');
logger.debug("Calling FTUESave(" + persist + ")");
jamClient.FTUESave(persist);
@ -690,6 +709,34 @@
logger.warn("unable to get value from framesize input: %o", $input.val());
return false;
}
// we need to help WDM users start with good starting input/output values.
if(isWDM()) {
var defaultInput = 1;
var defaultOutput = 1;
if(val == 2.5) {
defaultInput = 1;
defaultOutput = 1;
}
else if(val == 5) {
defaultInput = 3;
defaultOutput = 2;
}
else if(val == 10) {
defaultInput = 6;
defaultOutput = 5;
}
$('#ftue-2-asio-input-latency').val(defaultInput.toString());
$('#ftue-2-asio-output-latency').val(defaultOutput.toString());
logger.debug("Defaulting WDM input/output");
logger.debug("Calling FTUESetInputLatency(" + defaultInput + ")");
jamClient.FTUESetInputLatency(defaultInput);
logger.debug("Calling FTUESetOutputLatency(" + defaultOutput + ")");
jamClient.FTUESetOutputLatency(defaultOutput);
}
logger.debug("Calling FTUESetFrameSize(" + val + ")");
jamClient.FTUESetFrameSize(val);
return true;
@ -718,38 +765,51 @@
}
function newFtueSetAsioFrameSize(evt) {
releaseDropdown(function() {
releaseDropdown(function () {
renderStartNewFtueLatencyTesting();
if(!newFtueAsioFrameSizeToBackend($(evt.currentTarget))) {
if (!newFtueAsioFrameSizeToBackend($(evt.currentTarget))) {
renderStopNewFtueLatencyTesting();
return;
}
if (batchModify) { pendingFtueSave = true; } else { newFtueSave(false); }
if (batchModify) {
pendingFtueSave = true;
} else {
newFtueSave(false);
}
});
}
function newFtueSetAsioInputLatency(evt) {
releaseDropdown(function() {
releaseDropdown(function () {
renderStartNewFtueLatencyTesting();
if(!newFtueAsioInputLatencyToBackend($(evt.currentTarget))) {
if (!newFtueAsioInputLatencyToBackend($(evt.currentTarget))) {
renderStopNewFtueLatencyTesting();
return;
}
if (batchModify) { pendingFtueSave = true; } else { newFtueSave(false); }
if (batchModify) {
pendingFtueSave = true;
} else {
newFtueSave(false);
}
});
}
function newFtueSetAsioOutputLatency(evt) {
releaseDropdown(function() {
releaseDropdown(function () {
renderStartNewFtueLatencyTesting();
if(!newFtueAsioOutputLatencyToBackend($(evt.currentTarget))) {
if (!newFtueAsioOutputLatencyToBackend($(evt.currentTarget))) {
renderStopNewFtueLatencyTesting();
return;
}
if (batchModify) { pendingFtueSave = true; } else { newFtueSave(false); }
if (batchModify) {
pendingFtueSave = true;
} else {
newFtueSave(false);
}
});
}
@ -769,6 +829,10 @@
}
}
function isWDM() {
return jamClient.GetOSAsString() === "Win32" && !jamClient.FTUEHasControlPanel();
}
// Based on OS and Audio Hardware, set Frame/Buffer settings appropriately
// and show/hide the ASIO button.
function newFtueOsSpecificSettings() {

View File

@ -56,7 +56,8 @@
$(data.regions).each(function(index, item) {
var option = $('<option></option>');
option.text(item).val(item);
option.text(item);
option.val(item);
region_select.append(option)
})

View File

@ -185,6 +185,10 @@
line-height:19px;
}
.recording-controls {
padding:8px 5px 8px 25px !important;
}
.details {
color:#ED3618;
}