default audio profile and view added
Update logging dependency from 9.84 to 9.89 This is the newest version that doesn't lead to compile errors. It has also reduced the amount of "-Wexpansion-to-defined" errors on clang-msvc by about 80 (from ~400 to 320). Update easylogging license file Originally came as LICENCE.txt (notice C instead of S in LICENSE), renamed to better fit into the git history. Move logging defines to QMAKE instead of logging.h Defines done outside of easylogging++.h does not work according to official documentation (https://github.com/zuhd-org/easyloggingpp/blob/master/README.md#configuration-macros) "NOTE: All the macros can be defined in one of the following ways: 1. Define macros using -D option of compiler, for example in case of g++ you will do g++ source.cpp ... -DELPP_SYSLOG -DELPP_THREAD_SAFE ... (recommended way) 2. Define macros inside "easylogging++.h" (defining macros in other files won't work)" Linking to this issue: https://github.com/zuhd-org/easyloggingpp/issues/590#issuecomment-346753951 We are using the developer recommended way of defining them by command line. What is assumed to be the intention of enabling debug logs before including easylogging++ never actually did anything, hence this define is dropped. Newer versions of easylogging++ uses the macro ELPP_DISABLE_DEBUG_LOGS to _disable_ debug logs. Leaving that macro undefined satisfies the original intent. Move easylogging++ include into necessary files logging.h previously had logic to enable debug logging even on release builds. This logic was moved to the QMAKE file, hence the logging.h file is no longer necessary. Update easylogging++ to 9.96.7, turn on /WX for clang-msvc Updating from easylogging++ 9.89 to 9.96.7 turns it from a header only library to one requiring a source file. It has been added to sources near the other third party includes in the QMAKE to signify that it isn't a first party file. Updating easylogging++ also means that clang-msvc can compile without any warnings, hence turning on warnings as errors for that compiler as well, to avoid any regressions. updated to current fixed formatting fixed ptt add bug/compilerwarnings/c++14 target cleaned up .pro file fixed casting back to c++ style added default profile and ptt profile view fixed c++ casts fixed logic error on getDevice functions
This commit is contained in:
@@ -5,7 +5,9 @@
|
|||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
|
||||||
QT += core gui qml quick multimedia widgets
|
QT += core gui qml quick multimedia widgets
|
||||||
CONFIG += c++11
|
CONFIG += c++14
|
||||||
|
|
||||||
|
DEFINES += ELPP_THREAD_SAFE ELPP_QT_LOGGING ELPP_NO_DEFAULT_LOG_FILE
|
||||||
|
|
||||||
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5.6 or higher")
|
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5.6 or higher")
|
||||||
lessThan(QT_MINOR_VERSION, 6): error("requires Qt 5.6 or higher")
|
lessThan(QT_MINOR_VERSION, 6): error("requires Qt 5.6 or higher")
|
||||||
@@ -18,11 +20,10 @@ TEMPLATE = app
|
|||||||
#D9025: overriding '/W4' with '/W3'
|
#D9025: overriding '/W4' with '/W3'
|
||||||
QMAKE_CFLAGS_WARN_ON -= -W3
|
QMAKE_CFLAGS_WARN_ON -= -W3
|
||||||
QMAKE_CXXFLAGS_WARN_ON -= -W3
|
QMAKE_CXXFLAGS_WARN_ON -= -W3
|
||||||
|
#C4127 was in a third party file with no way to turn off.
|
||||||
QMAKE_CXXFLAGS += /W4 /wd4127
|
QMAKE_CXXFLAGS += /W4 /wd4127
|
||||||
|
|
||||||
!*clang-msvc{
|
|
||||||
QMAKE_CXXFLAGS += /WX
|
QMAKE_CXXFLAGS += /WX
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*g++* {
|
*g++* {
|
||||||
@@ -54,7 +55,6 @@ SOURCES += src/main.cpp\
|
|||||||
src/tabcontrollers/keyboardinput/KeyboardInputDummy.cpp
|
src/tabcontrollers/keyboardinput/KeyboardInputDummy.cpp
|
||||||
|
|
||||||
HEADERS += src/overlaycontroller.h \
|
HEADERS += src/overlaycontroller.h \
|
||||||
src/logging.h \
|
|
||||||
src/tabcontrollers/AudioTabController.h \
|
src/tabcontrollers/AudioTabController.h \
|
||||||
src/tabcontrollers/ChaperoneTabController.h \
|
src/tabcontrollers/ChaperoneTabController.h \
|
||||||
src/tabcontrollers/FixFloorTabController.h \
|
src/tabcontrollers/FixFloorTabController.h \
|
||||||
@@ -83,7 +83,8 @@ win32 {
|
|||||||
|
|
||||||
INCLUDEPATH += third-party/openvr/headers \
|
INCLUDEPATH += third-party/openvr/headers \
|
||||||
third-party/easylogging++
|
third-party/easylogging++
|
||||||
|
#easylogging++ used to be a header only lib. Now requires easylogging++.cc
|
||||||
|
SOURCES += third-party/easylogging++/easylogging++.cc
|
||||||
win32:LIBS += -L"$$PWD/third-party/openvr/lib/win64" -luser32 -lole32
|
win32:LIBS += -L"$$PWD/third-party/openvr/lib/win64" -luser32 -lole32
|
||||||
unix:LIBS += -L"$$PWD/third-party/openvr/lib/linux64"
|
unix:LIBS += -L"$$PWD/third-party/openvr/lib/linux64"
|
||||||
LIBS += -lopenvr_api
|
LIBS += -lopenvr_api
|
||||||
|
|||||||
@@ -23,9 +23,12 @@ For pushing changes to the repo:
|
|||||||
2. Clang format. Part of the [LLVM collection](https://releases.llvm.org/download.html).
|
2. Clang format. Part of the [LLVM collection](https://releases.llvm.org/download.html).
|
||||||
|
|
||||||
Additionally, for fully building portable and installer release versions:
|
Additionally, for fully building portable and installer release versions:
|
||||||
|
|
||||||
3. [7zip](https://www.7-zip.org/download.html)
|
3. [7zip](https://www.7-zip.org/download.html)
|
||||||
|
|
||||||
4. [Nullsoft Scriptable Install System (NSIS)](https://sourceforge.net/projects/nsis/)
|
4. [Nullsoft Scriptable Install System (NSIS)](https://sourceforge.net/projects/nsis/)
|
||||||
|
|
||||||
|
|
||||||
<a name="locs_and_envs"></a>
|
<a name="locs_and_envs"></a>
|
||||||
## Locations and Environment Variables
|
## Locations and Environment Variables
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
// easylogging includes
|
|
||||||
#ifndef _DEBUG
|
|
||||||
# define _DEBUG
|
|
||||||
# define ELPP_THREAD_SAFE
|
|
||||||
# define ELPP_QT_LOGGING
|
|
||||||
# define ELPP_NO_DEFAULT_LOG_FILE
|
|
||||||
# include <easylogging++.h>
|
|
||||||
# undef _DEBUG
|
|
||||||
#else
|
|
||||||
# define ELPP_THREAD_SAFE
|
|
||||||
# define ELPP_QT_LOGGING
|
|
||||||
# define ELPP_NO_DEFAULT_LOG_FILE
|
|
||||||
# include <easylogging++.h>
|
|
||||||
#endif
|
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <openvr.h>
|
#include <openvr.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "logging.h"
|
#include <easylogging++.h>
|
||||||
|
|
||||||
INITIALIZE_EASYLOGGINGPP
|
INITIALIZE_EASYLOGGINGPP
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <openvr.h>
|
#include <openvr.h>
|
||||||
#include "logging.h"
|
#include <easylogging++.h>
|
||||||
#include "utils/Matrix.h"
|
#include "utils/Matrix.h"
|
||||||
|
|
||||||
// application namespace
|
// application namespace
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <QQuickRenderControl>
|
#include <QQuickRenderControl>
|
||||||
#include <QSoundEffect>
|
#include <QSoundEffect>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "logging.h"
|
#include <easylogging++.h>
|
||||||
#include "utils/ChaperoneUtils.h"
|
#include "utils/ChaperoneUtils.h"
|
||||||
|
|
||||||
#include "tabcontrollers/SteamVRTabController.h"
|
#include "tabcontrollers/SteamVRTabController.h"
|
||||||
|
|||||||
@@ -663,7 +663,7 @@ MyStackViewPage {
|
|||||||
//audioProfileComboBox.currentIndex = AudioTabController.audioProfileDefaultIndex+1
|
//audioProfileComboBox.currentIndex = AudioTabController.audioProfileDefaultIndex+1
|
||||||
}
|
}
|
||||||
onPttProfileAdded:{
|
onPttProfileAdded:{
|
||||||
pttProfileComboBox.currentIndex = AudioTabController.getpttProfileCount()
|
pttProfileComboBox.currentIndex = AudioTabController.getPttProfileCount()
|
||||||
}
|
}
|
||||||
|
|
||||||
//onAudioProfileDefaultIndexChanged: {
|
//onAudioProfileDefaultIndexChanged: {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -3,17 +3,17 @@
|
|||||||
|
|
||||||
#include "AudioManager.h"
|
#include "AudioManager.h"
|
||||||
#include "PttController.h"
|
#include "PttController.h"
|
||||||
//#include "AudioProfileController.h"
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class QQuickWindow;
|
class QQuickWindow;
|
||||||
// application namespace
|
// application namespace
|
||||||
namespace advsettings {
|
namespace advsettings
|
||||||
|
{
|
||||||
|
// forward declaration
|
||||||
|
class OverlayController;
|
||||||
|
|
||||||
// forward declaration
|
struct AudioProfile
|
||||||
class OverlayController;
|
{
|
||||||
|
|
||||||
struct AudioProfile {
|
|
||||||
std::string profileName;
|
std::string profileName;
|
||||||
std::string playbackName;
|
std::string playbackName;
|
||||||
std::string mirrorName;
|
std::string mirrorName;
|
||||||
@@ -23,38 +23,39 @@ namespace advsettings {
|
|||||||
bool micMute = false;
|
bool micMute = false;
|
||||||
bool mirrorMute = false;
|
bool mirrorMute = false;
|
||||||
bool defaultProfile = false;
|
bool defaultProfile = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class AudioTabController : public PttController
|
||||||
class AudioTabController : public PttController {
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int playbackDeviceIndex READ playbackDeviceIndex WRITE setPlaybackDeviceIndex NOTIFY playbackDeviceIndexChanged)
|
Q_PROPERTY( int playbackDeviceIndex READ playbackDeviceIndex WRITE
|
||||||
Q_PROPERTY(int mirrorDeviceIndex READ mirrorDeviceIndex WRITE setMirrorDeviceIndex NOTIFY mirrorDeviceIndexChanged)
|
setPlaybackDeviceIndex NOTIFY playbackDeviceIndexChanged )
|
||||||
//Q_PROPERTY(bool mirrorPresent READ mirrorPresent NOTIFY mirrorPresentChanged)
|
Q_PROPERTY( int mirrorDeviceIndex READ mirrorDeviceIndex WRITE
|
||||||
//Q_PROPERTY(QString mirrorDevName READ mirrorDevName NOTIFY mirrorDevNameChanged)
|
setMirrorDeviceIndex NOTIFY mirrorDeviceIndexChanged )
|
||||||
Q_PROPERTY(float mirrorVolume READ mirrorVolume WRITE setMirrorVolume NOTIFY mirrorVolumeChanged)
|
Q_PROPERTY( float mirrorVolume READ mirrorVolume WRITE setMirrorVolume
|
||||||
Q_PROPERTY(bool mirrorMuted READ mirrorMuted WRITE setMirrorMuted NOTIFY mirrorMutedChanged)
|
NOTIFY mirrorVolumeChanged )
|
||||||
Q_PROPERTY(int micDeviceIndex READ micDeviceIndex WRITE setMicDeviceIndex NOTIFY micDeviceIndexChanged)
|
Q_PROPERTY( bool mirrorMuted READ mirrorMuted WRITE setMirrorMuted NOTIFY
|
||||||
//Q_PROPERTY(bool micPresent READ micPresent NOTIFY micPresentChanged)
|
mirrorMutedChanged )
|
||||||
//Q_PROPERTY(QString micDevName READ micDevName NOTIFY micDevNameChanged)
|
Q_PROPERTY( int micDeviceIndex READ micDeviceIndex WRITE setMicDeviceIndex
|
||||||
Q_PROPERTY(float micVolume READ micVolume WRITE setMicVolume NOTIFY micVolumeChanged)
|
NOTIFY micDeviceIndexChanged )
|
||||||
Q_PROPERTY(bool micMuted READ micMuted WRITE setMicMuted NOTIFY micMutedChanged)
|
Q_PROPERTY( float micVolume READ micVolume WRITE setMicVolume NOTIFY
|
||||||
Q_PROPERTY(bool micProximitySensorCanMute READ micProximitySensorCanMute WRITE setMicProximitySensorCanMute NOTIFY micProximitySensorCanMuteChanged)
|
micVolumeChanged )
|
||||||
Q_PROPERTY(bool micReversePtt READ micReversePtt WRITE setMicReversePtt NOTIFY micReversePttChanged)
|
Q_PROPERTY(
|
||||||
|
bool micMuted READ micMuted WRITE setMicMuted NOTIFY micMutedChanged )
|
||||||
|
Q_PROPERTY( bool micProximitySensorCanMute READ micProximitySensorCanMute
|
||||||
|
WRITE setMicProximitySensorCanMute NOTIFY
|
||||||
|
micProximitySensorCanMuteChanged )
|
||||||
|
Q_PROPERTY( bool micReversePtt READ micReversePtt WRITE setMicReversePtt
|
||||||
|
NOTIFY micReversePttChanged )
|
||||||
|
Q_PROPERTY( bool audioProfileDefault READ audioProfileDefault WRITE
|
||||||
|
setAudioProfileDefault NOTIFY audioProfileDefaultChanged )
|
||||||
|
|
||||||
Q_PROPERTY(bool audioProfileDefault READ audioProfileDefault WRITE setAudioProfileDefault NOTIFY audioProfileDefaultChanged)
|
private:
|
||||||
|
|
||||||
//To display default profile
|
|
||||||
//Q_PROPERTY(bool audioProfileDefaultIndex READ audioProfileDefaultIndex NOTIFY audioProfileDefaultIndexChanged)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
OverlayController* parent;
|
OverlayController* parent;
|
||||||
QQuickWindow* widget;
|
QQuickWindow* widget;
|
||||||
|
|
||||||
vr::VROverlayHandle_t m_ulNotificationOverlayHandle = vr::k_ulOverlayHandleInvalid;
|
vr::VROverlayHandle_t m_ulNotificationOverlayHandle
|
||||||
|
= vr::k_ulOverlayHandleInvalid;
|
||||||
|
|
||||||
int m_playbackDeviceIndex = -1;
|
int m_playbackDeviceIndex = -1;
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ namespace advsettings {
|
|||||||
bool m_micProximitySensorCanMute = false;
|
bool m_micProximitySensorCanMute = false;
|
||||||
bool m_micReversePtt = false;
|
bool m_micReversePtt = false;
|
||||||
bool m_isDefaultAudioProfile = false;
|
bool m_isDefaultAudioProfile = false;
|
||||||
//int m_defaultAudioProfileIndex = 2;
|
// int m_defaultAudioProfileIndex = 2;
|
||||||
std::string m_defaultProfileName;
|
std::string m_defaultProfileName;
|
||||||
|
|
||||||
unsigned settingsUpdateCounter = 0;
|
unsigned settingsUpdateCounter = 0;
|
||||||
@@ -78,36 +79,35 @@ namespace advsettings {
|
|||||||
std::vector<std::pair<std::string, std::string>> m_playbackDevices;
|
std::vector<std::pair<std::string, std::string>> m_playbackDevices;
|
||||||
std::string lastMirrorDevId;
|
std::string lastMirrorDevId;
|
||||||
|
|
||||||
QString getSettingsName() override { return "audioSettings"; }
|
QString getSettingsName() override
|
||||||
//QString getSettingsNameAudio() override { return "audioSettingsTest"; }
|
{
|
||||||
|
return "audioSettings";
|
||||||
|
}
|
||||||
void onPttStart() override;
|
void onPttStart() override;
|
||||||
void onPttStop() override;
|
void onPttStop() override;
|
||||||
void onPttEnabled() override;
|
void onPttEnabled() override;
|
||||||
void onPttDisabled() override;
|
void onPttDisabled() override;
|
||||||
bool pttChangeValid() override;
|
bool pttChangeValid() override;
|
||||||
virtual vr::VROverlayHandle_t getNotificationOverlayHandle() override { return m_ulNotificationOverlayHandle; }
|
virtual vr::VROverlayHandle_t getNotificationOverlayHandle() override
|
||||||
|
{
|
||||||
|
return m_ulNotificationOverlayHandle;
|
||||||
|
}
|
||||||
|
|
||||||
void findPlaybackDeviceIndex(std::string id, bool notify = true);
|
void findPlaybackDeviceIndex( std::string id, bool notify = true );
|
||||||
void findMirrorDeviceIndex(std::string id, bool notify = true);
|
void findMirrorDeviceIndex( std::string id, bool notify = true );
|
||||||
void findMicDeviceIndex(std::string id, bool notify = true);
|
void findMicDeviceIndex( std::string id, bool notify = true );
|
||||||
|
|
||||||
int getPlaybackIndex(std::string str);
|
int getPlaybackIndex( std::string str );
|
||||||
int getRecordingIndex(std::string str);
|
int getRecordingIndex( std::string str );
|
||||||
int getMirrorIndex(std::string str);
|
int getMirrorIndex( std::string str );
|
||||||
//void setPlaybackDeviceControl(int index, bool notify = true);
|
|
||||||
|
|
||||||
void removeDefaultProfile(QString name);
|
void removeDefaultProfile( QString name );
|
||||||
//void setAudioProfileDefaultIndex(int index);
|
|
||||||
//void setDefaultAudioProfileName(int index);
|
|
||||||
|
|
||||||
std::vector<AudioProfile> audioProfiles;
|
std::vector<AudioProfile> audioProfiles;
|
||||||
//std::recursive_mutex eventLoopMutexAudio;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
void initStage1();
|
void initStage1();
|
||||||
void initStage2(OverlayController* parent, QQuickWindow* widget);
|
void initStage2( OverlayController* parent1, QQuickWindow* widget1 );
|
||||||
|
|
||||||
void reloadAudioSettings();
|
void reloadAudioSettings();
|
||||||
void saveAudioSettings();
|
void saveAudioSettings();
|
||||||
@@ -126,69 +126,63 @@ namespace advsettings {
|
|||||||
bool micProximitySensorCanMute() const;
|
bool micProximitySensorCanMute() const;
|
||||||
bool micReversePtt() const;
|
bool micReversePtt() const;
|
||||||
bool audioProfileDefault() const;
|
bool audioProfileDefault() const;
|
||||||
//int audioProfileDefaultIndex() const;
|
// int audioProfileDefaultIndex() const;
|
||||||
|
|
||||||
void reloadAudioProfiles();
|
void reloadAudioProfiles();
|
||||||
void saveAudioProfiles();
|
void saveAudioProfiles();
|
||||||
Q_INVOKABLE void applyDefaultProfile();
|
Q_INVOKABLE void applyDefaultProfile();
|
||||||
|
|
||||||
Q_INVOKABLE int getPlaybackDeviceCount();
|
Q_INVOKABLE int getPlaybackDeviceCount();
|
||||||
Q_INVOKABLE QString getPlaybackDeviceName(int index);
|
Q_INVOKABLE QString getPlaybackDeviceName( int index );
|
||||||
|
|
||||||
Q_INVOKABLE int getRecordingDeviceCount();
|
Q_INVOKABLE int getRecordingDeviceCount();
|
||||||
Q_INVOKABLE QString getRecordingDeviceName(int index);
|
Q_INVOKABLE QString getRecordingDeviceName( int index );
|
||||||
|
|
||||||
//TODO check if needed?
|
|
||||||
Q_INVOKABLE unsigned getAudioProfileCount();
|
Q_INVOKABLE unsigned getAudioProfileCount();
|
||||||
Q_INVOKABLE QString getAudioProfileName(unsigned index);
|
Q_INVOKABLE QString getAudioProfileName( unsigned index );
|
||||||
|
|
||||||
|
|
||||||
void onNewRecordingDevice();
|
void onNewRecordingDevice();
|
||||||
void onNewPlaybackDevice();
|
void onNewPlaybackDevice();
|
||||||
void onNewMirrorDevice();
|
void onNewMirrorDevice();
|
||||||
void onDeviceStateChanged();
|
void onDeviceStateChanged();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void setMirrorVolume( float value, bool notify = true );
|
||||||
|
void setMirrorMuted( bool value, bool notify = true );
|
||||||
|
|
||||||
|
void setMicVolume( float value, bool notify = true );
|
||||||
|
void setMicMuted( bool value, bool notify = true );
|
||||||
|
void setMicProximitySensorCanMute( bool value, bool notify = true );
|
||||||
|
void setMicReversePtt( bool value, bool notify = true );
|
||||||
|
|
||||||
public slots:
|
void setPlaybackDeviceIndex( int value, bool notify = true );
|
||||||
void setMirrorVolume(float value, bool notify = true);
|
void setMirrorDeviceIndex( int value, bool notify = true );
|
||||||
void setMirrorMuted(bool value, bool notify = true);
|
void setMicDeviceIndex( int value, bool notify = true );
|
||||||
|
|
||||||
void setMicVolume(float value, bool notify = true);
|
void addAudioProfile( QString name );
|
||||||
void setMicMuted(bool value, bool notify = true);
|
void applyAudioProfile( unsigned index );
|
||||||
void setMicProximitySensorCanMute(bool value, bool notify = true);
|
void deleteAudioProfile( unsigned index );
|
||||||
void setMicReversePtt(bool value, bool notify = true);
|
|
||||||
|
|
||||||
void setPlaybackDeviceIndex(int value, bool notify = true);
|
void setAudioProfileDefault( bool value, bool notify = true );
|
||||||
void setMirrorDeviceIndex(int value, bool notify = true);
|
|
||||||
void setMicDeviceIndex(int value, bool notify = true);
|
|
||||||
|
|
||||||
void addAudioProfile(QString name);
|
signals:
|
||||||
void applyAudioProfile(unsigned index);
|
void playbackDeviceIndexChanged( int index );
|
||||||
void deleteAudioProfile(unsigned index);
|
|
||||||
|
|
||||||
void setAudioProfileDefault(bool value, bool notify = true);
|
void mirrorDeviceIndexChanged( int index );
|
||||||
|
void mirrorVolumeChanged( float value );
|
||||||
|
void mirrorMutedChanged( bool value );
|
||||||
|
|
||||||
signals:
|
void micDeviceIndexChanged( int index );
|
||||||
void playbackDeviceIndexChanged(int index);
|
void micVolumeChanged( float value );
|
||||||
|
void micMutedChanged( bool value );
|
||||||
void mirrorDeviceIndexChanged(int index);
|
void micProximitySensorCanMuteChanged( bool value );
|
||||||
void mirrorVolumeChanged(float value);
|
void micReversePttChanged( bool value );
|
||||||
void mirrorMutedChanged(bool value);
|
|
||||||
|
|
||||||
void micDeviceIndexChanged(int index);
|
|
||||||
void micVolumeChanged(float value);
|
|
||||||
void micMutedChanged(bool value);
|
|
||||||
void micProximitySensorCanMuteChanged(bool value);
|
|
||||||
void micReversePttChanged(bool value);
|
|
||||||
|
|
||||||
void playbackDeviceListChanged();
|
void playbackDeviceListChanged();
|
||||||
void recordingDeviceListChanged();
|
void recordingDeviceListChanged();
|
||||||
|
|
||||||
void audioProfilesUpdated();
|
void audioProfilesUpdated();
|
||||||
void audioProfileAdded();
|
void audioProfileAdded();
|
||||||
//void defaultAudioProfileApplied();
|
void audioProfileDefaultChanged( bool value );
|
||||||
//void audioProfileDefaultIndexChanged();
|
};
|
||||||
void audioProfileDefaultChanged(bool value);
|
} // namespace advsettings
|
||||||
};
|
|
||||||
|
|
||||||
|
|||||||
@@ -408,42 +408,57 @@ void PttController::addPttProfile( QString name )
|
|||||||
OverlayController::appSettings()->sync();
|
OverlayController::appSettings()->sync();
|
||||||
emit pttProfilesUpdated();
|
emit pttProfilesUpdated();
|
||||||
emit pttProfileAdded();
|
emit pttProfileAdded();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PttController::applyPttProfile(unsigned index) {
|
void PttController::applyPttProfile( unsigned index )
|
||||||
std::lock_guard<std::recursive_mutex> lock(eventLoopMutex);
|
{
|
||||||
if (index < pttProfiles.size()) {
|
std::lock_guard<std::recursive_mutex> lock( eventLoopMutex );
|
||||||
|
if ( index < pttProfiles.size() )
|
||||||
|
{
|
||||||
auto& profile = pttProfiles[index];
|
auto& profile = pttProfiles[index];
|
||||||
setPttShowNotification(profile.showNotification);
|
setPttShowNotification( profile.showNotification );
|
||||||
setPttLeftControllerEnabled(profile.leftControllerEnabled);
|
setPttLeftControllerEnabled( profile.leftControllerEnabled );
|
||||||
setPttRightControllerEnabled(profile.rightControllerEnabled);
|
setPttRightControllerEnabled( profile.rightControllerEnabled );
|
||||||
m_pttControllerConfigs[0].digitalButtons = profile.controllerConfigs[0].digitalButtons;
|
m_pttControllerConfigs[0].digitalButtons
|
||||||
m_pttControllerConfigs[0].digitalButtonMask = profile.controllerConfigs[0].digitalButtonMask;
|
= profile.controllerConfigs[0].digitalButtons;
|
||||||
m_pttControllerConfigs[0].triggerMode = profile.controllerConfigs[0].triggerMode;
|
m_pttControllerConfigs[0].digitalButtonMask
|
||||||
m_pttControllerConfigs[0].touchpadMode = profile.controllerConfigs[0].touchpadMode;
|
= profile.controllerConfigs[0].digitalButtonMask;
|
||||||
m_pttControllerConfigs[0].touchpadAreas = profile.controllerConfigs[0].touchpadAreas;
|
m_pttControllerConfigs[0].triggerMode
|
||||||
m_pttControllerConfigs[1].digitalButtons = profile.controllerConfigs[1].digitalButtons;
|
= profile.controllerConfigs[0].triggerMode;
|
||||||
m_pttControllerConfigs[1].digitalButtonMask = profile.controllerConfigs[1].digitalButtonMask;
|
m_pttControllerConfigs[0].touchpadMode
|
||||||
m_pttControllerConfigs[1].triggerMode = profile.controllerConfigs[1].triggerMode;
|
= profile.controllerConfigs[0].touchpadMode;
|
||||||
m_pttControllerConfigs[1].touchpadMode = profile.controllerConfigs[1].touchpadMode;
|
m_pttControllerConfigs[0].touchpadAreas
|
||||||
m_pttControllerConfigs[1].touchpadAreas = profile.controllerConfigs[1].touchpadAreas;
|
= profile.controllerConfigs[0].touchpadAreas;
|
||||||
}
|
m_pttControllerConfigs[1].digitalButtons
|
||||||
|
= profile.controllerConfigs[1].digitalButtons;
|
||||||
|
m_pttControllerConfigs[1].digitalButtonMask
|
||||||
|
= profile.controllerConfigs[1].digitalButtonMask;
|
||||||
|
m_pttControllerConfigs[1].triggerMode
|
||||||
|
= profile.controllerConfigs[1].triggerMode;
|
||||||
|
m_pttControllerConfigs[1].touchpadMode
|
||||||
|
= profile.controllerConfigs[1].touchpadMode;
|
||||||
|
m_pttControllerConfigs[1].touchpadAreas
|
||||||
|
= profile.controllerConfigs[1].touchpadAreas;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PttController::deletePttProfile(unsigned index) {
|
void PttController::deletePttProfile( unsigned index )
|
||||||
if (index < pttProfiles.size()) {
|
{
|
||||||
|
if ( index < pttProfiles.size() )
|
||||||
|
{
|
||||||
auto pos = pttProfiles.begin() + index;
|
auto pos = pttProfiles.begin() + index;
|
||||||
pttProfiles.erase(pos);
|
pttProfiles.erase( pos );
|
||||||
savePttProfiles();
|
savePttProfiles();
|
||||||
OverlayController::appSettings()->sync();
|
OverlayController::appSettings()->sync();
|
||||||
emit pttProfilesUpdated();
|
emit pttProfilesUpdated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariantList PttController::pttDigitalButtons(unsigned controller) {
|
QVariantList PttController::pttDigitalButtons( unsigned controller )
|
||||||
if (controller < 2) {
|
{
|
||||||
|
if ( controller < 2 )
|
||||||
|
{
|
||||||
return m_pttControllerConfigs[controller].digitalButtons;
|
return m_pttControllerConfigs[controller].digitalButtons;
|
||||||
|
|
||||||
}
|
}
|
||||||
return QVariantList();
|
return QVariantList();
|
||||||
}
|
}
|
||||||
@@ -496,138 +511,6 @@ QString PttController::getPttProfileName( unsigned index )
|
|||||||
return QString::fromStdString( pttProfiles[index].profileName );
|
return QString::fromStdString( pttProfiles[index].profileName );
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
|
||||||
|
|
||||||
void PttController::setPttEnabled(bool value, bool notify, bool save) {
|
|
||||||
std::lock_guard<std::recursive_mutex> lock(eventLoopMutex);
|
|
||||||
if (value != m_pttEnabled) {
|
|
||||||
m_pttEnabled = value;
|
|
||||||
if (value) {
|
|
||||||
onPttEnabled();
|
|
||||||
} else {
|
|
||||||
onPttDisabled();
|
|
||||||
}
|
|
||||||
if (notify) {
|
|
||||||
emit pttEnabledChanged(value);
|
|
||||||
}
|
|
||||||
if (save) {
|
|
||||||
savePttConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PttController::setPttShowNotification(bool value, bool notify, bool save) {
|
|
||||||
std::lock_guard<std::recursive_mutex> lock(eventLoopMutex);
|
|
||||||
if (value != m_pttShowNotification) {
|
|
||||||
m_pttShowNotification = value;
|
|
||||||
if (notify) {
|
|
||||||
emit pttShowNotificationChanged(value);
|
|
||||||
}
|
|
||||||
if (save) {
|
|
||||||
savePttConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PttController::setPttLeftControllerEnabled(bool value, bool notify, bool save) {
|
|
||||||
std::lock_guard<std::recursive_mutex> lock(eventLoopMutex);
|
|
||||||
if (value != m_pttLeftControllerEnabled) {
|
|
||||||
m_pttLeftControllerEnabled = value;
|
|
||||||
if (notify) {
|
|
||||||
emit pttLeftControllerEnabledChanged(value);
|
|
||||||
}
|
|
||||||
if (save) {
|
|
||||||
savePttConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PttController::setPttRightControllerEnabled(bool value, bool notify, bool save) {
|
|
||||||
std::lock_guard<std::recursive_mutex> lock(eventLoopMutex);
|
|
||||||
if (value != m_pttRightControllerEnabled) {
|
|
||||||
m_pttRightControllerEnabled = value;
|
|
||||||
if (notify) {
|
|
||||||
emit pttRightControllerEnabledChanged(value);
|
|
||||||
}
|
|
||||||
if (save) {
|
|
||||||
savePttConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void logControllerState(const vr::VRControllerState_t& state, const std::string& prefix) {
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_ApplicationMenu)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_ApplicationMenu) << " pressed";
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_ApplicationMenu)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_ApplicationMenu) << " touched";
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_Grip)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Grip) << " pressed";
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_Grip)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Grip) << " touched";
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_DPad_Left)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_DPad_Left) << " pressed";
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_DPad_Left)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_DPad_Left) << " touched";
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_DPad_Up)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_DPad_Up) << " pressed";
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_DPad_Up)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_DPad_Up) << " touched";
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_DPad_Right)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_DPad_Right) << " pressed";
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_DPad_Right)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_DPad_Right) << " touched";
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_DPad_Down)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_DPad_Down) << " pressed";
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_DPad_Down)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_DPad_Down) << " touched";
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_A)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_A) << " pressed";
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_A)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_A) << " touched";
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_Axis0)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis0) << " pressed";
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis0) << " x: " << state.rAxis[0].x << " y: " << state.rAxis[0].y;
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_Axis0)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis0) << " touched";
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis0) << " x: " << state.rAxis[0].x << " y: " << state.rAxis[0].y;
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_Axis1)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis1) << " pressed";
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis1) << " x: " << state.rAxis[1].x << " y: " << state.rAxis[0].y;
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_Axis1)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis1) << " touched";
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis1) << " x: " << state.rAxis[1].x << " y: " << state.rAxis[0].y;
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_Axis2)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis2) << " pressed";
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis2) << " x: " << state.rAxis[2].x << " y: " << state.rAxis[0].y;
|
|
||||||
}
|
|
||||||
if (state.ulButtonTouched & vr::ButtonMaskFromId(vr::k_EButton_Axis2)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis2) << " touched";
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis2) << " x: " << state.rAxis[2].x << " y: " << state.rAxis[0].y;
|
|
||||||
}
|
|
||||||
if (state.ulButtonPressed & vr::ButtonMaskFromId(vr::k_EButton_Axis3)) {
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis3) << " pressed";
|
|
||||||
LOG(INFO) << prefix << vr::VRSystem()->GetButtonIdNameFromEnum(vr::k_EButton_Axis3) << " x: " << state.rAxis[3].x << " y: " << state.rAxis[0].y;
|
|
||||||
=======
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PttController::setPttEnabled( bool value, bool notify, bool save )
|
void PttController::setPttEnabled( bool value, bool notify, bool save )
|
||||||
@@ -652,7 +535,6 @@ void PttController::setPttEnabled( bool value, bool notify, bool save )
|
|||||||
{
|
{
|
||||||
savePttConfig();
|
savePttConfig();
|
||||||
}
|
}
|
||||||
>>>>>>> cfde8ada6350ef771b110ba9f12b8b54daa7e07b
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,6 @@ signals:
|
|||||||
|
|
||||||
void pttProfilesUpdated();
|
void pttProfilesUpdated();
|
||||||
void pttProfileAdded();
|
void pttProfileAdded();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace advsettings
|
} // namespace advsettings
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "audiomanagerwindows.h"
|
#include "AudioManagerWindows.h"
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include "../../logging.h"
|
#include "easylogging++.h"
|
||||||
#include "../AudioTabController.h"
|
#include "../AudioTabController.h"
|
||||||
|
|
||||||
#include <locale>
|
#include <locale>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "KeyboardInputWindows.h"
|
#include "KeyboardInputWindows.h"
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include "../../logging.h"
|
#include "easylogging++.h"
|
||||||
|
|
||||||
namespace advsettings
|
namespace advsettings
|
||||||
{
|
{
|
||||||
|
|||||||
Vendored
+5
-4
@@ -1,10 +1,11 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2015 muflihun.com
|
Copyright (c) 2012-2018 Zuhd Web Services
|
||||||
|
Copyright (c) 2012-2018 @abumusamq
|
||||||
|
|
||||||
http://github.com/easylogging/
|
https://github.com/zuhd-org/
|
||||||
http://easylogging.muflihun.com
|
https://zuhd.org
|
||||||
http://muflihun.com
|
https://muflihun.com
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|||||||
+3112
File diff suppressed because it is too large
Load Diff
+1187
-3313
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user