FTUE audio settings. Load dropdowns with real audio devices.
This commit is contained in:
parent
c348239331
commit
81467d6654
|
|
@ -26,6 +26,27 @@
|
|||
|
||||
function FTUEGetStatus() { return ftueStatus; }
|
||||
function FTUESetStatus(b) { ftueStatus = b; }
|
||||
function FTUEGetMusicInputs() {
|
||||
dbg('FTUEGetMusicInputs');
|
||||
return {
|
||||
"i~11~MultiChannel (FW AP Multi)~0^i~11~Multichannel (FW AP Multi)~1":
|
||||
"Multichannel (FW AP Multi) - Channel 1/Multichannel (FW AP Multi) - Channel 2"
|
||||
};
|
||||
}
|
||||
function FTUEGetMusicOutputs() {
|
||||
dbg('FTUEGetMusicOutputs');
|
||||
return {
|
||||
"o~11~Multichannel (FW AP Multi)~0^o~11~Multichannel (FW AP Multi)~1":
|
||||
"Multichannel (FW AP Multi) - Channel 1/Multichannel (FW AP Multi) - Channel 2"
|
||||
};
|
||||
}
|
||||
function FTUEGetChatInputs() {
|
||||
dbg('FTUEGetChatInputs');
|
||||
return {
|
||||
"i~11~MultiChannel (FW AP Multi)~0^i~11~Multichannel (FW AP Multi)~1":
|
||||
"Multichannel (FW AP Multi) - Channel 1/Multichannel (FW AP Multi) - Channel 2"
|
||||
};
|
||||
}
|
||||
|
||||
function GetOS() { return 100000000; }
|
||||
function GetOSAsString() { return "Win32"; }
|
||||
|
|
@ -364,6 +385,9 @@
|
|||
// FTUE (round 3)
|
||||
this.FTUEGetStatus = FTUEGetStatus;
|
||||
this.FTUESetStatus = FTUESetStatus;
|
||||
this.FTUEGetMusicInputs = FTUEGetMusicInputs;
|
||||
this.FTUEGetMusicOutputs = FTUEGetMusicOutputs;
|
||||
this.FTUEGetChatInputs = FTUEGetChatInputs;
|
||||
|
||||
// Session
|
||||
this.SessionAddTrack = SessionAddTrack;
|
||||
|
|
|
|||
|
|
@ -153,12 +153,44 @@
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* This function loads the available audio devices from jamClient, and
|
||||
* builds up the select dropdowns in the audio-settings step of the FTUE wizard.
|
||||
*/
|
||||
function loadAudioDevices() {
|
||||
var funcs = [
|
||||
jamClient.FTUEGetMusicInputs,
|
||||
jamClient.FTUEGetMusicOutputs,
|
||||
jamClient.FTUEGetChatInputs
|
||||
];
|
||||
var selectors = [
|
||||
'[layout-wizard-step="2"] .audio-input select',
|
||||
'[layout-wizard-step="2"] .voice-chat-input select',
|
||||
'[layout-wizard-step="2"] .audio-output select'
|
||||
];
|
||||
var optionsHtml = '';
|
||||
var optionFunc = function(deviceKey, index, list) {
|
||||
optionsHtml += '<option value=' + deviceKey + '>' +
|
||||
devices[deviceKey] + '</option>';
|
||||
};
|
||||
for (var i=0; i<funcs.length; i++) {
|
||||
optionsHtml = '<option selected="selected" value="">Choose...</option>';
|
||||
var devices = funcs[i](); // returns hash of device id: device name
|
||||
var $select = $(selectors[i]);
|
||||
$select.empty();
|
||||
var sortedDeviceKeys = context._.keys(devices).sort();
|
||||
context._.each(sortedDeviceKeys, optionFunc);
|
||||
$select.html(optionsHtml);
|
||||
}
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
//
|
||||
//events();
|
||||
var dialogBindings = { 'beforeShow': beforeShow, 'afterShow': afterShow };
|
||||
app.bindDialog('ftue', dialogBindings);
|
||||
app.registerWizardStepFunction("4", testLatency);
|
||||
loadAudioDevices();
|
||||
}
|
||||
|
||||
// Expose publics
|
||||
|
|
|
|||
Loading…
Reference in New Issue