mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:10:25 +02:00
Initial implementation (deadlocks still occurring in Audio.cpp)
This commit is contained in:
parent
3b274c2b6e
commit
88a125aff0
4 changed files with 71 additions and 32 deletions
|
@ -152,6 +152,25 @@ Rectangle {
|
||||||
checked = Qt.binding(function() { return AudioScriptingInterface.noiseReduction; }); // restore binding
|
checked = Qt.binding(function() { return AudioScriptingInterface.noiseReduction; }); // restore binding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
AudioControls.CheckBox {
|
||||||
|
spacing: muteMic.spacing
|
||||||
|
text: qsTr("Push To Talk");
|
||||||
|
checked: isVR ? AudioScriptingInterface.pushToTalkHMD : AudioScriptingInterface.pushToTalkDesktop;
|
||||||
|
onClicked: {
|
||||||
|
if (isVR) {
|
||||||
|
AudioScriptingInterface.pushToTalkHMD = checked;
|
||||||
|
} else {
|
||||||
|
AudioScriptingInterface.pushToTalkDesktop = checked;
|
||||||
|
}
|
||||||
|
checked = Qt.binding(function() {
|
||||||
|
if (isVR) {
|
||||||
|
return AudioScriptingInterface.pushToTalkHMD;
|
||||||
|
} else {
|
||||||
|
return AudioScriptingInterface.pushToTalkDesktop;
|
||||||
|
}
|
||||||
|
}); // restore binding
|
||||||
|
}
|
||||||
|
}
|
||||||
AudioControls.CheckBox {
|
AudioControls.CheckBox {
|
||||||
spacing: muteMic.spacing
|
spacing: muteMic.spacing
|
||||||
text: qsTr("Show audio level meter");
|
text: qsTr("Show audio level meter");
|
||||||
|
|
|
@ -138,7 +138,7 @@ Rectangle {
|
||||||
Item {
|
Item {
|
||||||
id: status;
|
id: status;
|
||||||
|
|
||||||
readonly property string color: AudioScriptingInterface.muted ? colors.muted : colors.unmuted;
|
readonly property string color: (AudioScriptingInterface.pushingToTalk && AudioScriptingInterface.muted) ? hifi.colors.blueHighlight : AudioScriptingInterface.muted ? colors.muted : colors.unmuted;
|
||||||
|
|
||||||
visible: (AudioScriptingInterface.pushToTalk && !AudioScriptingInterface.pushingToTalk) || AudioScriptingInterface.muted;
|
visible: (AudioScriptingInterface.pushToTalk && !AudioScriptingInterface.pushingToTalk) || AudioScriptingInterface.muted;
|
||||||
|
|
||||||
|
|
|
@ -231,6 +231,26 @@ void Audio::loadData() {
|
||||||
_pttHMD = _pttHMDSetting.get();
|
_pttHMD = _pttHMDSetting.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Audio::getPTTHMD() const {
|
||||||
|
return resultWithReadLock<bool>([&] {
|
||||||
|
return _pttHMD;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Audio::saveData() {
|
||||||
|
_desktopMutedSetting.set(getMutedDesktop());
|
||||||
|
_hmdMutedSetting.set(getMutedHMD());
|
||||||
|
_pttDesktopSetting.set(getPTTDesktop());
|
||||||
|
_pttHMDSetting.set(getPTTHMD());
|
||||||
|
}
|
||||||
|
|
||||||
|
void Audio::loadData() {
|
||||||
|
_desktopMuted = _desktopMutedSetting.get();
|
||||||
|
_hmdMuted = _hmdMutedSetting.get();
|
||||||
|
_pttDesktop = _pttDesktopSetting.get();
|
||||||
|
_pttHMD = _pttHMDSetting.get();
|
||||||
|
}
|
||||||
|
|
||||||
bool Audio::noiseReductionEnabled() const {
|
bool Audio::noiseReductionEnabled() const {
|
||||||
return resultWithReadLock<bool>([&] {
|
return resultWithReadLock<bool>([&] {
|
||||||
return _enableNoiseReduction;
|
return _enableNoiseReduction;
|
||||||
|
|
Loading…
Reference in a new issue