mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 08:42:13 +02:00
fixing check box issues
This commit is contained in:
parent
8703e9e002
commit
c49d0557fc
5 changed files with 15 additions and 3 deletions
|
@ -129,7 +129,7 @@ Rectangle {
|
|||
id: stereoMic
|
||||
spacing: muteMic.spacing;
|
||||
text: qsTr("Use stereo for stereo devices");
|
||||
checked: false;
|
||||
checked: AudioScriptingInterface.isStereoEnabled();
|
||||
onClicked: {
|
||||
var success = AudioScriptingInterface.setStereoInput(checked);
|
||||
if (!success) {
|
||||
|
|
|
@ -193,6 +193,7 @@ public slots:
|
|||
bool isMuted() { return _muted; }
|
||||
|
||||
virtual bool setIsStereoInput(bool stereo) override;
|
||||
virtual bool isStereoEnabled() override { return _isStereoInput; }
|
||||
|
||||
void setNoiseReduction(bool isNoiseGateEnabled);
|
||||
bool isNoiseReductionEnabled() const { return _isNoiseGateEnabled; }
|
||||
|
|
|
@ -28,7 +28,7 @@ class AbstractAudioInterface : public QObject {
|
|||
Q_OBJECT
|
||||
public:
|
||||
AbstractAudioInterface(QObject* parent = 0) : QObject(parent) {};
|
||||
|
||||
|
||||
static void emitAudioPacket(const void* audioData, size_t bytes, quint16& sequenceNumber, bool isStereo,
|
||||
const Transform& transform, glm::vec3 avatarBoundingBoxCorner, glm::vec3 avatarBoundingBoxScale,
|
||||
PacketType packetType, QString codecName = QString(""));
|
||||
|
@ -40,8 +40,10 @@ public:
|
|||
|
||||
public slots:
|
||||
virtual bool shouldLoopbackInjectors() { return false; }
|
||||
|
||||
|
||||
virtual bool setIsStereoInput(bool stereo) = 0;
|
||||
|
||||
virtual bool isStereoEnabled() = 0;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(AbstractAudioInterface*)
|
||||
|
|
|
@ -67,3 +67,11 @@ bool AudioScriptingInterface::setStereoInput(bool stereo) {
|
|||
}
|
||||
return stereoInputChanged;
|
||||
}
|
||||
|
||||
bool AudioScriptingInterface::isStereoEnabled() {
|
||||
bool stereoEnabled = false;
|
||||
if (_localAudioInterface) {
|
||||
stereoEnabled = _localAudioInterface->isStereoEnabled();
|
||||
}
|
||||
return stereoEnabled;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ protected:
|
|||
Q_INVOKABLE ScriptAudioInjector* playSystemSound(SharedSoundPointer sound, const QVector3D& position);
|
||||
|
||||
Q_INVOKABLE bool setStereoInput(bool stereo);
|
||||
Q_INVOKABLE bool isStereoEnabled();
|
||||
|
||||
signals:
|
||||
void mutedByMixer(); /// the client has been muted by the mixer
|
||||
|
|
Loading…
Reference in a new issue