diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp
index bb70537adf..1e85cfd410 100644
--- a/interface/src/ui/PreferencesDialog.cpp
+++ b/interface/src/ui/PreferencesDialog.cpp
@@ -140,7 +140,12 @@ void PreferencesDialog::loadPreferences() {
ui.windowSecondsForDesiredReductionSpin->setValue(streamSettings._windowSecondsForDesiredReduction);
ui.repetitionWithFadeCheckBox->setChecked(streamSettings._repetitionWithFade);
- ui.outputBufferSizeSpinner->setValue(Application::getInstance()->getAudio()->getOutputBufferSize());
+ Audio* audio = Application::getInstance()->getAudio();
+ ui.outputBufferSizeSpinner->setValue(audio->getOutputBufferSize());
+
+ ui.outputStarveDetectionCheckBox->setChecked(audio->getOutputStarveDetectionEnabled());
+ ui.outputStarveDetectionThresholdSpinner->setValue(audio->getOutputStarveDetectionThreshold());
+ ui.outputStarveDetectionPeriodSpinner->setValue(audio->getOutputStarveDetectionPeriod());
ui.realWorldFieldOfViewSpin->setValue(menuInstance->getRealWorldFieldOfView());
@@ -253,10 +258,14 @@ void PreferencesDialog::savePreferences() {
Menu::getInstance()->setReceivedAudioStreamSettings(streamSettings);
audio->setReceivedAudioStreamSettings(streamSettings);
- Application::getInstance()->getAudio()->setReceivedAudioStreamSettings(streamSettings);
+ Application::getInstance()->getAudio()->setReceivedAudioStreamSettings(streamSettings);
QMetaObject::invokeMethod(audio, "setOutputBufferSize", Q_ARG(int, ui.outputBufferSizeSpinner->value()));
+ audio->setOutputStarveDetectionEnabled(ui.outputStarveDetectionCheckBox->isChecked());
+ audio->setOutputStarveDetectionThreshold(ui.outputStarveDetectionThresholdSpinner->value());
+ audio->setOutputStarveDetectionPeriod(ui.outputStarveDetectionPeriodSpinner->value());
+
Application::getInstance()->resizeGL(glCanvas->width(), glCanvas->height());
Application::getInstance()->bumpSettings();
diff --git a/interface/ui/preferencesDialog.ui b/interface/ui/preferencesDialog.ui
index 864f8aa282..db4a747322 100644
--- a/interface/ui/preferencesDialog.ui
+++ b/interface/ui/preferencesDialog.ui
@@ -59,9 +59,9 @@
0
- -690
+ -825
485
- 1499
+ 1611
@@ -1917,6 +1917,218 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 32
+ 40
+
+
+
+
+ 0
+ 0
+
+
+
+
+ Arial
+
+
+
+ Output Starve Detection (Automatic Buffer Size Increase)
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ 0
+
+
+ 7
+
+
+ 0
+
+
+ 7
+
+
-
+
+
+
+ Arial
+
+
+
+ Output Starve Detection Threshold
+
+
+ 0
+
+
+ windowSecondsForDesiredReductionSpin
+
+
+
+ -
+
+
+
+ Arial
+
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 100
+ 0
+
+
+
+
+ 70
+ 16777215
+
+
+
+
+ Arial
+
+
+
+ 1
+
+
+ 500
+
+
+ 1
+
+
+
+
+
+ -
+
+
+ 0
+
+
+ 7
+
+
+ 0
+
+
+ 7
+
+
-
+
+
+
+ Arial
+
+
+
+ Output Starve Detection Period (ms)
+
+
+ 0
+
+
+ windowSecondsForDesiredReductionSpin
+
+
+
+ -
+
+
+
+ Arial
+
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 100
+ 0
+
+
+
+
+ 70
+ 16777215
+
+
+
+
+ Arial
+
+
+
+ 1
+
+
+ 999999999
+
+
+ 1
+
+
+
+
+
-