* resolving VRFS-1781

This commit is contained in:
Seth Call 2014-06-13 12:51:03 -05:00
parent 1fe8a77b59
commit 8b85d2fb7f
18 changed files with 352 additions and 169 deletions

View File

@ -80,7 +80,8 @@
}
function validateVoiceChatSettings() {
return voiceChatHelper.trySave();
//return voiceChatHelper.trySave(); // not necessary since we use saveImmediate now
return true;
}
function showMusicAudioPanel() {
@ -117,7 +118,9 @@
});
$btnCancel.click(function() {
app.layout.closeDialog('configure-tracks')
if(voiceChatHelper.cancel()) {
app.layout.closeDialog('configure-tracks')
}
return false;
});
@ -214,11 +217,11 @@
$btnAddNewGear = $dialog.find('.btn-add-new-audio-gear');
$btnUpdateTrackSettings = $dialog.find('.btn-update-settings');
configureTracksHelper = new JK.ConfigureTracksHelper(app);
configureTracksHelper = new context.JK.ConfigureTracksHelper(app);
configureTracksHelper.initialize($dialog);
voiceChatHelper = new JK.VoiceChatHelper(app);
voiceChatHelper.initialize($dialog, false);
voiceChatHelper = new context.JK.VoiceChatHelper(app);
voiceChatHelper.initialize($dialog, 'configure_track_dialog', true, {vuType: "vertical", lightCount: 10, lightWidth: 3, lightHeight: 17}, 191);
events();
}

View File

@ -73,6 +73,9 @@
hoverChannel
.hover(function(e) {}, function() { removeHoverer($(this)); })
.mousedown(function(e) {
// because we have obscured the element the user wants to drag,
// we proxy a mousedown on the hover-element to the covered .ftue-input ($channel).
// this causes jquery.drag to get going even though the user clicked a different element
$channel.trigger(e)
})
hoverChannel.prependTo($offsetParent);

View File

@ -13,7 +13,6 @@
var $draggingFader = null;
var draggingOrientation = null;
var subscribers = {};
var logger = g.JK.logger;
function faderClick(e) {
@ -21,7 +20,6 @@
var $fader = $(this);
draggingOrientation = $fader.attr('orientation');
var faderId = $fader.attr("fader-id");
var offset = $fader.offset();
var position = { top: e.pageY - offset.top, left: e.pageX - offset.left}
@ -31,12 +29,7 @@
return false;
}
// Notify subscribers of value change
g._.each(subscribers, function (changeFunc, index, list) {
if (faderId === index) {
changeFunc(faderId, faderPct, false);
}
});
$fader.parent().triggerHandler('fader_change', {percentage: faderPct, dragging: false})
setHandlePosition($fader, faderPct);
return false;
@ -110,7 +103,6 @@
}
function onFaderDrag(e, ui) {
var faderId = $draggingFader.attr("fader-id");
var faderPct = faderValue($draggingFader, e, ui.position);
// protect against attempts to drag outside of the slider, which jquery.draggable sometimes allows
@ -118,12 +110,7 @@
return false;
}
// Notify subscribers of value change
g._.each(subscribers, function (changeFunc, index, list) {
if (faderId === index) {
changeFunc(faderId, faderPct, true);
}
});
$draggingFader.parent().triggerHandler('fader_change', {percentage: faderPct, dragging: true})
}
function onFaderDragStart(e, ui) {
@ -133,7 +120,6 @@
}
function onFaderDragStop(e, ui) {
var faderId = $draggingFader.attr("fader-id");
var faderPct = faderValue($draggingFader, e, ui.position);
// protect against attempts to drag outside of the slider, which jquery.draggable sometimes allows
@ -142,12 +128,8 @@
return;
}
// Notify subscribers of value change
g._.each(subscribers, function (changeFunc, index, list) {
if (faderId === index) {
changeFunc(faderId, faderPct, false);
}
});
$draggingFader.parent().triggerHandler('fader_change', {percentage: faderPct, dragging: false});
$draggingFaderHandle = null;
$draggingFader = null;
draggingOrientation = null;
@ -159,26 +141,15 @@
g.JK.FaderHelpers = {
/**
* Subscribe to fader change events. Provide a subscriber id
* and a function in the form: change(faderId, newValue) which
* will be called anytime a fader changes value.
*/
subscribe: function (subscriberId, changeFunction) {
subscribers[subscriberId] = changeFunction;
},
/**
* Render a fader into the element identifed by the provided
* selector, with the provided options.
*/
renderFader: function (selector, userOptions) {
selector = $(selector);
if (userOptions === undefined) {
throw ("renderFader: userOptions is required");
}
if (!(userOptions.hasOwnProperty("faderId"))) {
throw ("renderFader: userOptions.faderId is required");
}
var renderDefaults = {
faderType: "vertical",
height: 83, // only used for vertical
@ -189,9 +160,9 @@
"#template-fader-h" : '#template-fader-v';
var templateSource = $(templateSelector).html();
$(selector).html(g._.template(templateSource, options));
selector.html(g._.template(templateSource, options));
$('div[control="fader-handle"]', $(selector)).draggable({
selector.find('div[control="fader-handle"]').draggable({
drag: onFaderDrag,
start: onFaderDragStart,
stop: onFaderDragStop,
@ -202,7 +173,7 @@
// Embed any custom styles, applied to the .fader below selector
if ("style" in options) {
for (var key in options.style) {
$(selector + ' .fader').css(key, options.style[key]);
selector.find(' .fader').css(key, options.style[key]);
}
}
},

View File

@ -110,11 +110,8 @@
});
}
function faderChange(faderId, newValue, dragging) {
var setFunction = faderMap[faderId];
// TODO - using hardcoded range of -80 to 20 for output levels.
var mixerLevel = newValue - 80; // Convert our [0-100] to [-80 - +20] range
setFunction(mixerLevel);
function faderChange(e, data) {
}
function setSaveButtonState($save, enabled) {
@ -1043,7 +1040,7 @@
context.JK.ftueVUCallback = function (dbValue, selector) {
// Convert DB into a value from 0.0 - 1.0
var floatValue = (dbValue + 80) / 100;
context.JK.VuHelpers.updateVU(selector, floatValue);
context.JK.VuHelpers.updateVU($(selector), floatValue);
};
context.JK.ftueAudioInputVUCallback = function (dbValue) {

View File

@ -491,7 +491,8 @@
}
});
var faderId = mixerIds.join(',');
$('#volume').attr('mixer-id', faderId);
var $volume = $('#volume');
$volume.attr('mixer-id', faderId);
var faderOpts = {
faderId: faderId,
faderType: "horizontal",
@ -502,8 +503,9 @@
"height": "24px"
}
};
context.JK.FaderHelpers.renderFader("#volume", faderOpts);
context.JK.FaderHelpers.subscribe(faderId, faderChanged);
context.JK.FaderHelpers.renderFader($volume, faderOpts);
$volume.on('fader_change', faderChanged);
// Visually update fader to underlying mixer start value.
// Always do this, even if gainPercent is zero.
@ -537,8 +539,8 @@
"height": "24px"
}
};
context.JK.FaderHelpers.renderFader(faderId, faderOpts);
context.JK.FaderHelpers.subscribe(faderId, l2mChanged);
context.JK.FaderHelpers.renderFader($mixSlider, faderOpts);
$mixSlider.on('fader_change', l2mChanged);
var value = context.jamClient.SessionGetMasterLocalMix();
context.JK.FaderHelpers.setFaderValue(faderId, percentFromMixerValue(-80, 20, value));
@ -547,9 +549,9 @@
/**
* This has a specialized jamClient call, so custom handler.
*/
function l2mChanged(faderId, newValue, dragging) {
function l2mChanged(e, data) {
//var dbValue = context.JK.FaderHelpers.convertLinearToDb(newValue);
context.jamClient.SessionSetMasterLocalMix(newValue - 80);
context.jamClient.SessionSetMasterLocalMix(data.percentage - 80);
}
function _addVoiceChat() {
@ -561,7 +563,8 @@
var $voiceChat = $('#voice-chat');
$voiceChat.show();
$voiceChat.attr('mixer-id', mixer.id);
$('#voice-chat .voicechat-mute').attr('mixer-id', mixer.id);
var $voiceChatGain = $voiceChat.find('.voicechat-gain');
var $voiceChatMute = $voiceChat.find('.voicechat-mute').attr('mixer-id', mixer.id);
var gainPercent = percentFromMixerValue(
mixer.range_low, mixer.range_high, mixer.volume_left);
var faderOpts = {
@ -569,12 +572,11 @@
faderType: "horizontal",
width: 50
};
context.JK.FaderHelpers.renderFader("#voice-chat .voicechat-gain", faderOpts);
context.JK.FaderHelpers.subscribe(mixer.id, faderChanged);
context.JK.FaderHelpers.renderFader($voiceChatGain, faderOpts);
$voiceChatGain.on('fader_change', faderChanged);
context.JK.FaderHelpers.setFaderValue(mixer.id, gainPercent);
if (mixer.mute) {
var $mute = $voiceChat.find('.voicechat-mute');
_toggleVisualMuteControl($mute, true);
_toggleVisualMuteControl($voiceChatMute, true);
}
}
});
@ -783,16 +785,17 @@
var vuLeftSelector = trackSelector + " .track-vu-left";
var vuRightSelector = trackSelector + " .track-vu-right";
var faderSelector = trackSelector + " .track-gain";
var $fader = $(faderSelector).attr('mixer-id', mixerId);
var $track = $(trackSelector);
// Set mixer-id attributes and render VU/Fader
context.JK.VuHelpers.renderVU(vuLeftSelector, vuOpts);
$track.find('.track-vu-left').attr('mixer-id', mixerId + '_vul');
context.JK.VuHelpers.renderVU(vuRightSelector, vuOpts);
$track.find('.track-vu-right').attr('mixer-id', mixerId + '_vur');
context.JK.FaderHelpers.renderFader(faderSelector, faderOpts);
context.JK.FaderHelpers.renderFader($fader, faderOpts);
// Set gain position
context.JK.FaderHelpers.setFaderValue(mixerId, gainPercent);
context.JK.FaderHelpers.subscribe(mixerId, faderChanged);
$fader.on('fader_change', faderChanged);
}
// Function called on an interval when participants change. Mixers seem to
@ -867,14 +870,14 @@
if (!(mixer.stereo)) { // mono track
if (mixerId.substr(-4) === "_vul") {
// Do the left
selector = '#tracks [mixer-id="' + pureMixerId + '_vul"]';
selector = $('#tracks [mixer-id="' + pureMixerId + '_vul"]');
context.JK.VuHelpers.updateVU(selector, value);
// Do the right
selector = '#tracks [mixer-id="' + pureMixerId + '_vur"]';
selector = $('#tracks [mixer-id="' + pureMixerId + '_vur"]');
context.JK.VuHelpers.updateVU(selector, value);
} // otherwise, it's a mono track, _vur event - ignore.
} else { // stereo track
selector = '#tracks [mixer-id="' + mixerId + '"]';
selector = $('#tracks [mixer-id="' + mixerId + '"]');
context.JK.VuHelpers.updateVU(selector, value);
}
}
@ -940,12 +943,14 @@
* Will be called when fader changes. The fader id (provided at subscribe time),
* the new value (0-100) and whether the fader is still being dragged are passed.
*/
function faderChanged(faderId, newValue, dragging) {
function faderChanged(e, data) {
var $target = $(this);
var faderId = $target.attr('mixer-id');
var mixerIds = faderId.split(',');
$.each(mixerIds, function(i,v) {
var broadcast = !(dragging); // If fader is still dragging, don't broadcast
var broadcast = !(data.dragging); // If fader is still dragging, don't broadcast
fillTrackVolumeObject(v, broadcast);
setMixerVolume(v, newValue);
setMixerVolume(v, data.percentage);
});
}

View File

@ -479,7 +479,7 @@
rest.putTrackSyncChange(syncTrackRequest)
.done(function() {
})
.fail(function() {
.fail(function(jqXHR) {
if(jqXHR.status != 404) {
app.notify({
"title": "Can't Sync Local Tracks",

View File

@ -19,11 +19,18 @@
var $chatInputs = null;
var $templateChatInput = null;
var $selectedChatInput = null;// should only be used if isChatEnabled = true
var saveImmediate = null; // if true, then every action by the user results in a save to the backend immediately, false means you have to call trySave to persist
var $voiceChatVuLeft = null;
var $voiceChatVuRight = null;
var $voiceChatFader = null;
var saveImmediate = null; // if true, then every action by the user results in a save to the backend immediately, false means you have to call trySave to persist
var uniqueCallbackName = null;
// needed because iCheck fires iChecked event even when you programmatically change it, unlike when using .val(x)
var ignoreICheckEvent = false;
var lastSavedTime = new Date();
var vuOptions = null;
var faderHeight = null;
var startingState = null;
function defaultReuse() {
suppressChange(function(){
@ -54,10 +61,13 @@
}
function beforeShow() {
renderNoVolume();
context.JK.onBackendEvent(ALERT_NAMES.AUDIO_DEVICE_NOT_PRESENT, 'voice_chat_helper', onInvalidAudioDevice);
registerVuCallbacks();
}
function beforeHide() {
context.JK.offBackendEvent(ALERT_NAMES.AUDIO_DEVICE_NOT_PRESENT, 'voice_chat_helper', onInvalidAudioDevice);
jamClient.FTUERegisterVUCallbacks('', '', '');
}
function reset(forceDisabledChat) {
@ -132,6 +142,10 @@
// context.JK.prodBubble($parent.find('.use-chat-input h3'), 'chat-not-enabled', {}, { positions:['left']});
// }
})
renderVolumes();
startingState = getCurrentState();
}
function disableChatButtonsUI() {
@ -172,6 +186,7 @@
var result = context.jamClient.TrackSaveAssignments();
if(!result || result.length == 0) {
renderNoVolume();
// success
suppressChange(function() {
$reuseAudioInputRadio.iCheck('check').attr('checked', 'checked');
@ -190,7 +205,7 @@
$useChatInputRadio.removeAttr('checked');
})
}
disableChatButtonsUI()
disableChatButtonsUI();
}
function enableChat(applyToBackend) {
@ -220,6 +235,7 @@
}
enableChatButtonsUI();
renderVolumes();
}
function handleChatEnabledToggle() {
@ -247,9 +263,17 @@
return state;
}
function trySave() {
function cancel() {
logger.debug("canceling voice chat state");
return trySave(startingState);
}
var state = getCurrentState();
function trySave(state) {
if(!state) {
state = getCurrentState();
}
if(state.enabled && state.chat_channel) {
logger.debug("enabling chat. chat_channel=" + state.chat_channel);
@ -270,6 +294,9 @@
if(!result || result.length == 0) {
// success
if(!state.enabled) {
renderNoVolume();
}
return true;
}
else {
@ -278,20 +305,77 @@
}
}
function initialize(_$step, _saveImmediate) {
function initializeVUMeters() {
context.JK.VuHelpers.renderVU($voiceChatVuLeft, vuOptions);
context.JK.VuHelpers.renderVU($voiceChatVuRight, vuOptions);
context.JK.FaderHelpers.renderFader($voiceChatFader, {faderId: '', faderType: "vertical", height: faderHeight});
$voiceChatFader.on('fader_change', faderChange);
}
// renders volumes based on what the backend says
function renderVolumes() {
var $fader = $voiceChatFader.find('[control="fader"]');
var db = context.jamClient.FTUEGetChatInputVolume();
var faderPct = db + 80;
context.JK.FaderHelpers.setHandlePosition($fader, faderPct);
}
function renderNoVolume() {
var $fader = $voiceChatFader.find('[control="fader"]');
context.JK.FaderHelpers.setHandlePosition($fader, 50);
context.JK.VuHelpers.updateVU($voiceChatVuLeft, 0);
context.JK.VuHelpers.updateVU($voiceChatVuRight, 0);
}
function faderChange(e, data) {
// TODO - using hardcoded range of -80 to 20 for output levels.
var mixerLevel = data.percentage - 80; // Convert our [0-100] to [-80 - +20] range
context.jamClient.FTUESetChatInputVolume(mixerLevel);
}
function registerVuCallbacks() {
logger.debug("voice-chat-helper: registering vu callbacks");
jamClient.FTUERegisterVUCallbacks(
"JK.voiceChatHelperAudioOutputVUCallback",
"JK.voiceChatHelperAudioInputVUCallback",
"JK." + uniqueCallbackName
);
jamClient.SetVURefreshRate(200);
}
function initialize(_$step, caller, _saveImmediate, _vuOptions, _faderHeight) {
$parent = _$step;
saveImmediate = _saveImmediate;
vuOptions = _vuOptions;
faderHeight = _faderHeight;
$reuseAudioInputRadio = $parent.find('.reuse-audio-input input');
$useChatInputRadio = $parent.find('.use-chat-input input');
$chatInputs = $parent.find('.chat-inputs');
$templateChatInput = $('#template-chat-input');
$voiceChatVuLeft = $parent.find('.voice-chat-vu-left');
$voiceChatVuRight = $parent.find('.voice-chat-vu-right');
$voiceChatFader = $parent.find('.chat-fader')
handleChatEnabledToggle();
initializeVUMeters();
renderVolumes();
uniqueCallbackName = 'voiceChatHelperChatInputVUCallback' + caller;
context.JK[uniqueCallbackName] = function(dbValue) {
context.JK.ftueVUCallback(dbValue, $voiceChatVuLeft);
context.JK.ftueVUCallback(dbValue, $voiceChatVuRight);
}
}
context.JK.voiceChatHelperAudioInputVUCallback = function (dbValue) {};
context.JK.voiceChatHelperAudioOutputVUCallback = function (dbValue) {};
this.reset = reset;
this.trySave = trySave;
this.cancel = cancel;
this.initialize = initialize;
this.beforeShow = beforeShow;
this.beforeHide = beforeHide;

View File

@ -19,6 +19,7 @@
* vuType can be either "horizontal" or "vertical"
*/
renderVU: function(selector, userOptions) {
selector = $(selector);
/**
* The default options for rendering a VU
*/
@ -35,25 +36,25 @@
templateSelector = "#template-vu-h";
}
var templateSource = $(templateSelector).html();
$(selector).empty();
selector.empty();
$(selector).html(context._.template(templateSource, options, {variable: 'data'}));
selector.html(context._.template(templateSource, options, {variable: 'data'}));
},
/**
* Given a selector representing a container for a VU meter and
* a value between 0.0 and 1.0, light the appropriate lights.
*/
updateVU: function (selector, value) {
updateVU: function ($selector, value) {
// There are 13 VU lights. Figure out how many to
// light based on the incoming value.
var countSelector = 'tr';
var horizontal = ($('table.horizontal', selector).length);
var horizontal = ($selector.find('table.horizontal').length);
if (horizontal) {
countSelector = 'td';
}
var lightCount = $(countSelector, selector).length;
var lightCount = $selector.find(countSelector).length;
var i = 0;
var state = 'on';
var lights = Math.round(value * lightCount);
@ -61,15 +62,15 @@
var $light = null;
var colorClass = 'vu-green-';
var lightSelectorPrefix = selector + ' td.vu';
var lightSelectorPrefix = $selector.find('td.vu');
var thisLightSelector = null;
// Remove all light classes from all lights
var allLightsSelector = selector + ' td.vulight';
var allLightsSelector = $selector.find('td.vulight');
$(allLightsSelector).removeClass('vu-green-off vu-green-on vu-red-off vu-red-on');
// Set the lights
for (i=0; i<lightCount; i++) {
for (i = 0; i < lightCount; i++) {
colorClass = 'vu-green-';
state = 'on';
if (i >= redSwitch) {
@ -78,9 +79,7 @@
if (i >= lights) {
state = 'off';
}
thisLightSelector = lightSelectorPrefix + i;
$light = $(thisLightSelector);
$light.addClass(colorClass + state);
allLightsSelector.eq(lightCount - i - 1).addClass(colorClass + state);
}
}

View File

@ -43,7 +43,7 @@
function initialize(_$step) {
$step = _$step;
voiceChatHelper.initialize($step, true);
voiceChatHelper.initialize($step, 'configure_voice_gear_wizard', true, {vuType: "vertical", lightCount: 8, lightWidth: 3, lightHeight: 10}, 101);
}

View File

@ -144,19 +144,6 @@
return false;
}
var $allOutputs = $outputChannels.find('input[type="checkbox"]');
if ($allOutputs.length < 2) {
if(!audioOutputDeviceId || audioOutputDeviceId == '') {
context.JK.prodBubble($audioOutput.closest('.easydropdown-wrapper'), 'select-output', {}, {positions:['right', 'top'], duration:7000});
}
else {
// this path indicates that the user has deliberately chosen a device, so we need to tell them that this device does not work with JamKazam
context.JK.prodBubble($audioOutput.closest('.easydropdown-wrapper'), 'select-output', {}, {positions:['right', 'top'], duration:7000});
}
return false;
}
// ensure 1, or preferably 2, input channels are selected
var $assignedInputs = $inputChannels.find('input[type="checkbox"]:checked');
var $unassignedInputs = $inputChannels.find('input[type="checkbox"]:not(:checked)');
@ -174,6 +161,20 @@
}
}
var $allOutputs = $outputChannels.find('input[type="checkbox"]');
if ($allOutputs.length < 2) {
if(!audioOutputDeviceId || audioOutputDeviceId == '') {
context.JK.prodBubble($audioOutput.closest('.easydropdown-wrapper'), 'select-output', {}, {positions:['right', 'top'], duration:7000});
}
else {
// this path indicates that the user has deliberately chosen a device, so we need to tell them that this device does not work with JamKazam
context.JK.prodBubble($audioOutput.closest('.easydropdown-wrapper'), 'select-output', {}, {positions:['right', 'top'], duration:7000});
}
return false;
}
// ensure 2 outputs are selected
var $assignedOutputs = $outputChannels.find('input[type="checkbox"]:checked');
var $unassignedOutputs = $outputChannels.find('input[type="checkbox"]:not(:checked)');

View File

@ -28,6 +28,12 @@
var $outputChannels = null;
var $templateAudioPort = null;
var $scoreReport = null;
var $audioInputVuLeft = null;
var $audioInputVuRight = null;
var $audioInputFader = null;
var $audioOutputVuLeft = null;
var $audioOutputVuRight = null;
var $audioOutputFader = null;
var faderMap = {
'loopback-audio-input-fader': jamClient.FTUESetInputVolume,
@ -220,43 +226,45 @@
}
function initializeVUMeters() {
var vuMeters = [
'#loopback-audio-input-vu-left',
'#loopback-audio-input-vu-right',
'#loopback-audio-output-vu-left',
'#loopback-audio-output-vu-right'
];
$.each(vuMeters, function () {
context.JK.VuHelpers.renderVU(this,
{vuType: "horizontal", lightCount: 12, lightWidth: 15, lightHeight: 3});
});
var vuOptions = {vuType: "horizontal", lightCount: 12, lightWidth: 15, lightHeight: 3};
var faders = context._.keys(faderMap);
$.each(faders, function () {
var fid = this;
context.JK.FaderHelpers.renderFader('#' + fid,
{faderId: fid, faderType: "horizontal", width: 163});
context.JK.FaderHelpers.subscribe(fid, faderChange);
});
context.JK.VuHelpers.renderVU($audioInputVuLeft, vuOptions);
context.JK.VuHelpers.renderVU($audioInputVuRight, vuOptions);
context.JK.VuHelpers.renderVU($audioOutputVuLeft, vuOptions);
context.JK.VuHelpers.renderVU($audioOutputVuRight, vuOptions);
var faderOptions = {faderId: '', faderType: "horizontal", width: 163};
context.JK.FaderHelpers.renderFader($audioInputFader, faderOptions);
context.JK.FaderHelpers.renderFader($audioOutputFader, faderOptions);
$audioInputFader.on('fader_change', inputFaderChange);
$audioOutputFader.on('fader_change', outputFaderChange);
}
// renders volumes based on what the backend says
function renderVolumes() {
$.each(context._.keys(faderReadMap), function (index, faderId) {
// faderChange takes a value from 0-100
var $fader = $('[fader-id="' + faderId + '"]');
var db = faderReadMap[faderId]();
var faderPct = db + 80;
context.JK.FaderHelpers.setHandlePosition($fader, faderPct);
});
// input
var $inputFader = $audioInputFader.find('[control="fader"]');
var db = context.jamClient.FTUEGetInputVolume();
var faderPct = db + 80;
context.JK.FaderHelpers.setHandlePosition($inputFader, faderPct);
// output
var $outputFader = $audioOutputFader.find('[control="fader"]');
var db = context.jamClient.FTUEGetOutputVolume();
var faderPct = db + 80;
context.JK.FaderHelpers.setHandlePosition($outputFader, faderPct);
}
function faderChange(faderId, newValue, dragging) {
var setFunction = faderMap[faderId];
// TODO - using hardcoded range of -80 to 20 for output levels.
var mixerLevel = newValue - 80; // Convert our [0-100] to [-80 - +20] range
setFunction(mixerLevel);
function inputFaderChange(e, data) {
var mixerLevel = data.percentage - 80; // Convert our [0-100] to [-80 - +20] range
context.jamClient.FTUESetInputVolume(mixerLevel);
}
function outputFaderChange(e, data) {
var mixerLevel = data.percentage - 80;
context.jamClient.FTUESetOutputVolume(mixerLevel);
}
function registerVuCallbacks() {
@ -329,6 +337,13 @@
$outputChannels = $step.find('.output-ports')
$templateAudioPort = $('#template-audio-port');
$scoreReport = $step.find('.results');
$audioInputVuLeft = $step.find('.audio-input-vu-left');
$audioInputVuRight = $step.find('.audio-input-vu-right');
$audioInputFader= $step.find('.audio-input-fader');
$audioOutputVuLeft = $step.find('.audio-output-vu-left');
$audioOutputVuRight = $step.find('.audio-output-vu-right');
$audioOutputFader= $step.find('.audio-output-fader');
operatingSystem = context.JK.GetOSAsString();
frameBuffers.initialize($step.find('.frame-and-buffers'));
@ -348,18 +363,19 @@
initializeASIOButtons();
initializeResync();
}
context.JK.loopbackAudioInputVUCallback = function (dbValue) {
context.JK.ftueVUCallback(dbValue, '#loopback-audio-input-vu-left');
context.JK.ftueVUCallback(dbValue, '#loopback-audio-input-vu-right');
};
context.JK.loopbackAudioOutputVUCallback = function (dbValue) {
context.JK.ftueVUCallback(dbValue, '#loopback-audio-output-vu-left');
context.JK.ftueVUCallback(dbValue, '#loopback-audio-output-vu-right');
};
context.JK.loopbackChatInputVUCallback = function (dbValue) {
};
context.JK.loopbackAudioInputVUCallback = function (dbValue) {
context.JK.ftueVUCallback(dbValue, $audioInputVuLeft);
context.JK.ftueVUCallback(dbValue, $audioInputVuRight);
};
context.JK.loopbackAudioOutputVUCallback = function (dbValue) {
context.JK.ftueVUCallback(dbValue, $audioOutputVuLeft);
context.JK.ftueVUCallback(dbValue, $audioOutputVuRight);
};
context.JK.loopbackChatInputVUCallback = function (dbValue) {
};
}
this.getGearTest = getGearTest;
this.handleNext = handleNext;

View File

@ -38,7 +38,7 @@
float:left;
vertical-align:top;
@include border_box_sizing;
padding: 20px 20px 0 0;
padding: 0 20px 0 0;
}
.sub-column {
@ -48,6 +48,25 @@
@include border_box_sizing;
}
.ftue-box.chat-inputs {
height:224px;
width:90%;
@include border_box_sizing;
}
.vu-meter {
width:10%;
height:224px;
padding: 0 3px;
.ftue-controls {
height: 224px;
}
}
.tab {
padding-top:20px;
}
.tab[tab-id="music-audio"] {
.column {
&:nth-of-type(1) {

View File

@ -1,8 +1,47 @@
@import "client/common.css.scss";
@charset "UTF-8";
.dialog.configure-tracks, .dialog.gear-wizard {
table.vu {
position:absolute;
}
.ftue-controls {
position:relative;
width: 55px;
background-color: #222;
float:right;
}
.ftue-vu-left {
position: relative;
left: 0px;
}
.ftue-vu-right {
position: relative;
left: 46px;
}
.ftue-fader {
//margin:5px 6px;
position: absolute;
top: 8px;
left: 14px;
}
.gain-label {
color: $ColorScreenPrimary;
position: absolute;
bottom: -1px;
left: 10px;
}
.voicechat-option {
position: relative;
float:left;
width:50%;
height:109px;
div {
@ -33,14 +72,23 @@
}
}
.ftue-box {
.vu-meter {
@include border_box_sizing;
float:left;
}
.ftue-box {
@include border_box_sizing;
background-color: #222222;
font-size: 13px;
padding: 8px;
&.chat-inputs {
height: 230px !important;
//height: 230px !important;
overflow: auto;
color:white;
float:left;
&.disabled {
color:gray;
@ -50,6 +98,7 @@
display: inline-block;
height: 32px;
vertical-align: middle;
line-height:20px;
}
.chat-input {
@ -60,5 +109,7 @@
}
}
}
}
}

View File

@ -203,7 +203,7 @@
width: 25%;
&:nth-of-type(2) {
width: 50%;
width: 75%;
}
}
@ -211,6 +211,28 @@
margin-top: 25px;
}
.ftue-box.chat-inputs {
height:124px;
width:85%;
@include border_box_sizing;
}
.vu-meter {
width:15%;
padding: 0 3px;
.ftue-controls {
height: 124px;
}
.chat-fader {
top:4px !important;
}
}
.voice-chat-header {
margin-top:10px;
}
}
.wizard-step[layout-wizard-step="4"] {

View File

@ -48,21 +48,26 @@
.tab{'tab-id' => 'voice-chat'}
.column
%form.select-voice-chat-option.section
.sub-header Select Voice Chat Option
.voicechat-option.reuse-audio-input
%input{type:"radio", name: "voicechat", checked:"checked"}
%h3 Use Music Microphone
%p I am already using a microphone to capture my vocal or instrumental music, so I can talk with other musicians using that microphone
.voicechat-option.use-chat-input
%input{type:"radio", name: "voicechat"}
%h3 Use Chat Microphone
%p I am not using a microphone for acoustic instruments or vocals, so use the input selected to the right for voice chat during my sessions
.column
.select-voice-chat
.sub-header Voice Chat Input
.ftue-box.chat-inputs
%form.select-voice-chat-option.section.voice
.sub-header Select Voice Chat Option
.voicechat-option.reuse-audio-input
%input{type:"radio", name: "voicechat", checked:"checked"}
%h3 Use Music Microphone
%p I am already using a microphone to capture my vocal or instrumental music, so I can talk with other musicians using that microphone
.voicechat-option.use-chat-input
%input{type:"radio", name: "voicechat"}
%h3 Use Chat Microphone
%p I am not using a microphone for acoustic instruments or vocals, so use the input selected to the right for voice chat during my sessions
.clearall
.select-voice-chat
.sub-header Voice Chat Input
.ftue-box.chat-inputs
.vu-meter
.ftue-controls
.ftue-vu-left.voice-chat-vu-left
.ftue-fader.chat-fader
.gain-label GAIN
.ftue-vu-right.voice-chat-vu-right
.clearall
.buttons

View File

@ -35,5 +35,5 @@
</script>
<script type="text/template" id="template-help-minimum-output-channels">
To be a valid output audio device, the device must have at least 2 output ports.
To be a valid output audio device, it must have at least 2 output ports.
</script>

View File

@ -99,7 +99,7 @@
.center
%a.button-orange.watch-video{href:'#'} WATCH VIDEO
.wizard-step-column
%h2 Select Voice Chat Option
%h2.sub-header Select Voice Chat Option
%form.voice
.voicechat-option.reuse-audio-input
%input{type:"radio", name: "voicechat", checked:"checked"}
@ -109,9 +109,16 @@
%input{type:"radio", name: "voicechat"}
%h3 Use Chat Microphone
%p I am not using a microphone for acoustic instruments or vocals, so use the input selected to the right for voice chat during my sessions
.wizard-step-column
%h2 Voice Chat Input
.clearall
// .wizard-step-column
%h2.sub-header.voice-chat-header Voice Chat Input
.ftue-box.chat-inputs
.vu-meter
.ftue-controls
.ftue-vu-left.voice-chat-vu-left
.ftue-fader.chat-fader
.gain-label GAIN
.ftue-vu-right.voice-chat-vu-right
.wizard-step{ 'layout-wizard-step' => "4", 'dialog-title' => "Turn Off Direct Monitoring", 'dialog-purpose' => "DirectMonitoring" }

View File

@ -46,10 +46,10 @@
%h2.ports-header Audio Input Ports
.ftue-box.input-ports.ports
.ftue-controls
.ftue-vu-left#loopback-audio-input-vu-left
.ftue-fader#loopback-audio-input-fader
.ftue-vu-left.audio-input-vu-left
.ftue-fader.audio-input-fader
.gain-label GAIN
.ftue-vu-right#loopback-audio-input-vu-right
.ftue-vu-right.audio-input-vu-right
= render :partial => "/clients/wizard/framebuffers"
.wizard-step-column
%h2
@ -59,10 +59,10 @@
%h2.ports-header Audio Output Ports
.ftue-box.output-ports.ports
.ftue-controls
.ftue-vu-left#loopback-audio-output-vu-left
.ftue-fader#loopback-audio-output-fader
.ftue-vu-left.audio-output-vu-left
.ftue-fader.audio-output-fader
.gain-label GAIN
.ftue-vu-right#loopback-audio-output-vu-right
.ftue-vu-right.audio-output-vu-right
%a.button-orange.resync-btn RESYNC
.wizard-step-column
%h2.test-results-header