mirror of
https://github.com/overte-org/overte.git
synced 2025-07-16 01:16:43 +02:00
adding settingsLoaded bool check
This commit is contained in:
parent
d8ba08ec2d
commit
ddb040eaf7
2 changed files with 4 additions and 2 deletions
|
@ -174,7 +174,7 @@ void Audio::setPTTDesktop(bool enabled) {
|
||||||
_pttDesktop = enabled;
|
_pttDesktop = enabled;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!enabled) {
|
if (!enabled && _settingsLoaded) {
|
||||||
// Set to default behavior (unmuted for Desktop) on Push-To-Talk disable.
|
// Set to default behavior (unmuted for Desktop) on Push-To-Talk disable.
|
||||||
setMutedDesktop(true);
|
setMutedDesktop(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -202,7 +202,7 @@ void Audio::setPTTHMD(bool enabled) {
|
||||||
_pttHMD = enabled;
|
_pttHMD = enabled;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!enabled) {
|
if (!enabled && _settingsLoaded) {
|
||||||
// Set to default behavior (unmuted for HMD) on Push-To-Talk disable.
|
// Set to default behavior (unmuted for HMD) on Push-To-Talk disable.
|
||||||
setMutedHMD(false);
|
setMutedHMD(false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -231,6 +231,7 @@ void Audio::loadData() {
|
||||||
|
|
||||||
auto client = DependencyManager::get<AudioClient>().data();
|
auto client = DependencyManager::get<AudioClient>().data();
|
||||||
QMetaObject::invokeMethod(client, "setMuted", Q_ARG(bool, isMuted()), Q_ARG(bool, false));
|
QMetaObject::invokeMethod(client, "setMuted", Q_ARG(bool, isMuted()), Q_ARG(bool, false));
|
||||||
|
_settingsLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Audio::getPTTHMD() const {
|
bool Audio::getPTTHMD() const {
|
||||||
|
|
|
@ -409,6 +409,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
bool _settingsLoaded { false };
|
||||||
float _inputVolume { 1.0f };
|
float _inputVolume { 1.0f };
|
||||||
float _inputLevel { 0.0f };
|
float _inputLevel { 0.0f };
|
||||||
float _localInjectorGain { 0.0f }; // in dB
|
float _localInjectorGain { 0.0f }; // in dB
|
||||||
|
|
Loading…
Reference in a new issue