mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 15:39:57 +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
|
id: stereoMic
|
||||||
spacing: muteMic.spacing;
|
spacing: muteMic.spacing;
|
||||||
text: qsTr("Use stereo for stereo devices");
|
text: qsTr("Use stereo for stereo devices");
|
||||||
checked: false;
|
checked: AudioScriptingInterface.isStereoEnabled();
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var success = AudioScriptingInterface.setStereoInput(checked);
|
var success = AudioScriptingInterface.setStereoInput(checked);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
|
|
@ -193,6 +193,7 @@ public slots:
|
||||||
bool isMuted() { return _muted; }
|
bool isMuted() { return _muted; }
|
||||||
|
|
||||||
virtual bool setIsStereoInput(bool stereo) override;
|
virtual bool setIsStereoInput(bool stereo) override;
|
||||||
|
virtual bool isStereoEnabled() override { return _isStereoInput; }
|
||||||
|
|
||||||
void setNoiseReduction(bool isNoiseGateEnabled);
|
void setNoiseReduction(bool isNoiseGateEnabled);
|
||||||
bool isNoiseReductionEnabled() const { return _isNoiseGateEnabled; }
|
bool isNoiseReductionEnabled() const { return _isNoiseGateEnabled; }
|
||||||
|
|
|
@ -42,6 +42,8 @@ public slots:
|
||||||
virtual bool shouldLoopbackInjectors() { return false; }
|
virtual bool shouldLoopbackInjectors() { return false; }
|
||||||
|
|
||||||
virtual bool setIsStereoInput(bool stereo) = 0;
|
virtual bool setIsStereoInput(bool stereo) = 0;
|
||||||
|
|
||||||
|
virtual bool isStereoEnabled() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(AbstractAudioInterface*)
|
Q_DECLARE_METATYPE(AbstractAudioInterface*)
|
||||||
|
|
|
@ -67,3 +67,11 @@ bool AudioScriptingInterface::setStereoInput(bool stereo) {
|
||||||
}
|
}
|
||||||
return stereoInputChanged;
|
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 ScriptAudioInjector* playSystemSound(SharedSoundPointer sound, const QVector3D& position);
|
||||||
|
|
||||||
Q_INVOKABLE bool setStereoInput(bool stereo);
|
Q_INVOKABLE bool setStereoInput(bool stereo);
|
||||||
|
Q_INVOKABLE bool isStereoEnabled();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void mutedByMixer(); /// the client has been muted by the mixer
|
void mutedByMixer(); /// the client has been muted by the mixer
|
||||||
|
|
Loading…
Reference in a new issue