[Linux] Implement adaptive audio noice

This commit is contained in:
Tim Gromeyer
2025-03-26 14:42:31 +01:00
parent d004d12bb1
commit 55ba67190d
3 changed files with 65 additions and 0 deletions

View File

@@ -36,5 +36,41 @@ ApplicationWindow {
checked: airPodsTrayApp.conversationalAwareness
onCheckedChanged: airPodsTrayApp.conversationalAwareness = checked
}
Slider {
visible: airPodsTrayApp.adaptiveModeActive
from: 0
to: 100
stepSize: 1
value: airPodsTrayApp.adaptiveNoiseLevel
property Timer debounceTimer: Timer {
interval: 500 // 500ms delay after last change
onTriggered: {
if (!parent.pressed) {
airPodsTrayApp.setAdaptiveNoiseLevel(parent.value)
}
}
}
onPressedChanged: {
if (!pressed) {
debounceTimer.stop()
airPodsTrayApp.setAdaptiveNoiseLevel(value)
}
}
onValueChanged: {
if (pressed) {
debounceTimer.restart()
}
}
Label {
text: "Adaptive Noise Level: " + parent.value
color: "#ffffff"
anchors.top: parent.bottom
}
}
}
}