mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 06:23:10 +02:00
Add "gated" indicator to audio level meter
This commit is contained in:
parent
d014dc2d14
commit
52aa20b4d5
1 changed files with 22 additions and 2 deletions
|
@ -16,7 +16,13 @@ import TabletScriptingInterface 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
readonly property var level: AudioScriptingInterface.inputLevel;
|
readonly property var level: AudioScriptingInterface.inputLevel;
|
||||||
|
|
||||||
|
property bool gated: false;
|
||||||
|
Component.onCompleted: {
|
||||||
|
AudioScriptingInterface.noiseGateOpened.connect(function() { gated = false; });
|
||||||
|
AudioScriptingInterface.noiseGateClosed.connect(function() { gated = true; });
|
||||||
|
}
|
||||||
|
|
||||||
property bool standalone: false;
|
property bool standalone: false;
|
||||||
property var dragTarget: null;
|
property var dragTarget: null;
|
||||||
|
|
||||||
|
@ -189,7 +195,7 @@ Rectangle {
|
||||||
|
|
||||||
Rectangle { // mask
|
Rectangle { // mask
|
||||||
id: mask;
|
id: mask;
|
||||||
width: parent.width * level;
|
width: gated ? 0 : parent.width * level;
|
||||||
radius: 5;
|
radius: 5;
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom;
|
bottom: parent.bottom;
|
||||||
|
@ -225,5 +231,19 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: gatedIndicator;
|
||||||
|
visible: gated
|
||||||
|
|
||||||
|
radius: 4;
|
||||||
|
width: 2 * radius;
|
||||||
|
height: 2 * radius;
|
||||||
|
color: "#0080FF";
|
||||||
|
anchors {
|
||||||
|
right: parent.left;
|
||||||
|
verticalCenter: parent.verticalCenter;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue