Fix BUGZ-336

This commit is contained in:
Zach Fox 2019-05-23 14:25:06 -07:00
parent 3232b1a028
commit 78fdd2d673
2 changed files with 10 additions and 18 deletions

View file

@ -251,6 +251,7 @@ Flickable {
}
SimplifiedControls.Button {
id: audioLoopbackButton
property bool audioLoopedBack: AudioScriptingInterface.getLocalEcho()
function startAudioLoopback() {
@ -266,17 +267,14 @@ Flickable {
}
}
Timer {
id: loopbackTimer
interval: 8000
running: false
repeat: false
onTriggered: {
Component.onDestruction: stopAudioLoopback();
onVisibleChanged: {
if (!visible) {
stopAudioLoopback();
}
}
id: testYourMicButton
enabled: !HMD.active
anchors.left: parent.left
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
@ -285,10 +283,8 @@ Flickable {
text: audioLoopedBack ? "STOP TESTING" : "TEST YOUR MIC"
onClicked: {
if (audioLoopedBack) {
loopbackTimer.stop();
stopAudioLoopback();
} else {
loopbackTimer.restart();
startAudioLoopback();
}
}

View file

@ -235,6 +235,7 @@ Flickable {
}
SimplifiedControls.Button {
id: audioLoopbackButton
property bool audioLoopedBack: AudioScriptingInterface.getLocalEcho()
function startAudioLoopback() {
@ -250,17 +251,14 @@ Flickable {
}
}
Timer {
id: loopbackTimer
interval: 8000
running: false
repeat: false
onTriggered: {
Component.onDestruction: stopAudioLoopback();
onVisibleChanged: {
if (!visible) {
stopAudioLoopback();
}
}
id: testYourMicButton
enabled: HMD.active
anchors.left: parent.left
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
@ -269,10 +267,8 @@ Flickable {
text: audioLoopedBack ? "STOP TESTING" : "TEST YOUR MIC"
onClicked: {
if (audioLoopedBack) {
loopbackTimer.stop();
stopAudioLoopback();
} else {
loopbackTimer.restart();
startAudioLoopback();
}
}