mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
wire up audio show level meter menu
This commit is contained in:
parent
58668654d0
commit
2177765b09
5 changed files with 9 additions and 6 deletions
|
@ -86,7 +86,7 @@ Hifi.AvatarInputs {
|
|||
id: controls
|
||||
width: root.mirrorWidth
|
||||
height: 44
|
||||
visible: !root.isHMD
|
||||
visible: root.showAudioTools
|
||||
anchors.top: mirror.bottom
|
||||
|
||||
Rectangle {
|
||||
|
|
|
@ -156,9 +156,8 @@ Menu::Menu() {
|
|||
addCheckableActionToQMenuAndActionHash(audioMenu, MenuOption::MuteAudio, Qt::CTRL | Qt::Key_M, false,
|
||||
audioIO.data(), SLOT(toggleMute()));
|
||||
|
||||
// Audio > Level Meter [advanced] -- FIXME: needs implementation
|
||||
auto levelMeterAction = addCheckableActionToQMenuAndActionHash(audioMenu, "Level Meter", 0, false, NULL, NULL, UNSPECIFIED_POSITION, "Advanced");
|
||||
levelMeterAction->setDisabled(true);
|
||||
// Audio > Show Level Meter
|
||||
addCheckableActionToQMenuAndActionHash(audioMenu, MenuOption::AudioTools, 0, true);
|
||||
|
||||
|
||||
// Avatar menu ----------------------------------
|
||||
|
|
|
@ -156,6 +156,7 @@ namespace MenuOption {
|
|||
const QString AssetMigration = "ATP Asset Migration";
|
||||
const QString Atmosphere = "Atmosphere";
|
||||
const QString Attachments = "Attachments...";
|
||||
const QString AudioNetworkStats = "Audio Network Stats";
|
||||
const QString AudioNoiseReduction = "Audio Noise Reduction";
|
||||
const QString AudioScope = "Show Scope";
|
||||
const QString AudioScopeFiftyFrames = "Fifty";
|
||||
|
@ -163,8 +164,8 @@ namespace MenuOption {
|
|||
const QString AudioScopeFrames = "Display Frames";
|
||||
const QString AudioScopePause = "Pause Scope";
|
||||
const QString AudioScopeTwentyFrames = "Twenty";
|
||||
const QString AudioNetworkStats = "Audio Network Stats";
|
||||
const QString AudioStatsShowInjectedStreams = "Audio Stats Show Injected Streams";
|
||||
const QString AudioTools = "Show Level Meter";
|
||||
const QString AutoMuteAudio = "Auto Mute Microphone";
|
||||
const QString AvatarReceiveStats = "Show Receive Stats";
|
||||
const QString Back = "Back";
|
||||
|
|
|
@ -67,6 +67,7 @@ void AvatarInputs::update() {
|
|||
AI_UPDATE(cameraEnabled, !Menu::getInstance()->isOptionChecked(MenuOption::NoFaceTracking));
|
||||
AI_UPDATE(cameraMuted, Menu::getInstance()->isOptionChecked(MenuOption::MuteFaceTracking));
|
||||
AI_UPDATE(isHMD, qApp->isHMDMode());
|
||||
AI_UPDATE(showAudioTools, Menu::getInstance()->isOptionChecked(MenuOption::AudioTools));
|
||||
|
||||
auto audioIO = DependencyManager::get<AudioClient>();
|
||||
const float AUDIO_METER_AVERAGING = 0.5;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
public: \
|
||||
type name() { return _##name; }; \
|
||||
private: \
|
||||
type _##name{ initialValue };
|
||||
type _##name{ initialValue };
|
||||
|
||||
class AvatarInputs : public QQuickItem {
|
||||
Q_OBJECT
|
||||
|
@ -31,6 +31,7 @@ class AvatarInputs : public QQuickItem {
|
|||
AI_PROPERTY(bool, mirrorVisible, false)
|
||||
AI_PROPERTY(bool, mirrorZoomed, true)
|
||||
AI_PROPERTY(bool, isHMD, false)
|
||||
AI_PROPERTY(bool, showAudioTools, true)
|
||||
|
||||
public:
|
||||
static AvatarInputs* getInstance();
|
||||
|
@ -46,6 +47,7 @@ signals:
|
|||
void mirrorVisibleChanged();
|
||||
void mirrorZoomedChanged();
|
||||
void isHMDChanged();
|
||||
void showAudioToolsChanged();
|
||||
|
||||
protected:
|
||||
Q_INVOKABLE void resetSensors();
|
||||
|
|
Loading…
Reference in a new issue