show 20/40 for WDM

This commit is contained in:
Seth Call 2017-09-15 08:41:45 -05:00
parent 37c7550a08
commit 0e2874ae67
5 changed files with 46 additions and 2 deletions

View File

@ -77,7 +77,7 @@ gem 'carrierwave', '0.11.2' #, '0.9.0'
gem 'carrierwave_direct'
gem 'fog'
#gem 'jquery-payment-rails', github: 'sethcall/jquery-payment-rails'
gem 'haml-rails', '0.9.0'
gem 'haml-rails', '0.9.0' # pinned because upgrading lets u not do = "{% if(data.feed_item['has_mount?']) { %}" . ? is bad
gem 'unf' #optional fog dependency
gem 'devise', '3.3.0' #3.4.0 causes uninitialized constant ActionController::Metal (NameError)
gem 'postgres-copy'

View File

@ -188,6 +188,10 @@ StatsInfo = {
framesize = '5 ms'
else if audio.framesize == 10
framesize = '10 ms'
else if audio.framesize == 20
framesize = '20 ms'
else if audio.framesize == 40
framesize = '40 ms'
audioStats.push(@stat(audio, 'audio', 'Frame Size', 'framesize', framesize))
networkTag = null

View File

@ -66,6 +66,30 @@
$bufferOut.val('0');
}
function switchToWdm() {
if($frameSize.find('option').length == 3){
console.log("switching to WDM framesizez")
$frameSize.html('<option val="2.5">2.5</option><option val="5">5</option><option val="10">10</option><option val="20">20</option><option val="40">40</option>')
context.JK.dropdown($frameSize);
}
else {
console.log("nothing to switch to on WDM")
}
}
function switchOffWdm() {
if($frameSize.find('option').length != 3){
console.log("switching off of WDM")
$frameSize.html('<option val="2.5">2.5</option><option val="5">5</option><option val="10">10</option>')
context.JK.dropdown($frameSize);
}
else {
console.log("nothing to clean up on WDM")
}
}
function events() {
$frameSize.unbind('change').change(function () {
$self.triggerHandler(FRAMESIZE_CHANGED, {value: selectedFramesize()});
@ -115,6 +139,8 @@
this.setFramesize = setFramesize;
this.setBufferIn = setBufferIn;
this.setBufferOut = setBufferOut;
this.switchOffWdm = switchOffWdm;
this.switchToWdm = switchToWdm;
this.render = render;
this.enable = enable;
this.disable = disable;

View File

@ -867,6 +867,15 @@
else {
var inputSampleRate = 44100;
}
if (selectedDeviceInfo.input.info.type == 'Win32_wdm' || selectedDeviceInfo.output.info.type == 'Win32_wdm') {
console.log("WDM selected; expand WDM framesize")
frameBuffers.switchToWdm()
}
else {
console.log("NOT WDM selected; go to normal framesizes")
frameBuffers.switchOffWdm()
}
// ignore all this; just set it to
inputSampleRate = 'DEVICE_DEFAULT'
logger.debug("applying the sample rate based on input device: " + selectedDeviceInfo.input.id + " (" + inputSampleRate + ")");

View File

@ -51,8 +51,13 @@
var GEAR_TEST_IO_PROGRESS = "gear_test.io_progress";
var GEAR_TEST_INVALIDATED_ASYNC = "gear_test.async_invalidated"; // happens when backend alerts us device is invalid
function isWdm() {
console.log("selectedDeviceInfo", selectedDeviceInfo)
return true
}
function isGoodFtue() {
return validIOScore && !asynchronousInvalidDevice;
return (isWdm() || validIOScore) && !asynchronousInvalidDevice;
}
function processIOScore(io) {